Check if Server.getServer() is not null before trying to get property from it.
This commit is contained in:
parent
0b2b5718aa
commit
9bcdfd7cd0
1 changed files with 5 additions and 1 deletions
|
@ -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:
|
||||||
|
|
Loading…
Add table
Reference in a new issue