From 51130ce0f519aa3ac648999413e76558679ee182 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Mon, 30 Jul 2012 15:58:05 +0200 Subject: [PATCH] =?utf8?q?Don=E2=80=99t=20load=20properties=20if=20there?= =?utf8?q?=20is=20no=20object.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/main/java/net/pterodactylus/demoscenemusic/data/DataManager.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/net/pterodactylus/demoscenemusic/data/DataManager.java b/src/main/java/net/pterodactylus/demoscenemusic/data/DataManager.java index f5b071f..f3d3578 100644 --- a/src/main/java/net/pterodactylus/demoscenemusic/data/DataManager.java +++ b/src/main/java/net/pterodactylus/demoscenemusic/data/DataManager.java @@ -808,6 +808,9 @@ public class DataManager { * if a database error occurs */ private T loadProperties(final T object, final String table, String type) throws DatabaseException { + if (object == null) { + return null; + } Query query = new Query(Type.SELECT, table); query.addField(new Field(table + ".PROPERTY")); query.addField(new Field(table + ".VALUE")); -- 2.7.4