Check if Server.getServer() is not null before trying to get property from it.

This commit is contained in:
hns 2005-03-09 15:49:00 +00:00
parent 0b2b5718aa
commit 9bcdfd7cd0

View file

@ -46,7 +46,11 @@ public abstract class ImageGenerator {
if (generator == null) { if (generator == null) {
// first see wether an image wrapper class was specified in // first see wether an image wrapper class was specified in
// server.properties: // server.properties:
String className = Server.getServer().getProperty("imageGenerator"); String className = null;
if (Server.getServer() != null) {
className = Server.getServer().getProperty("imageGenerator");
}
Class generatorClass = null; Class generatorClass = null;
if (className == null) { if (className == null) {
// if no class is defined, try the default ones: // if no class is defined, try the default ones: