aboutsummaryrefslogtreecommitdiffstats
path: root/ardor3d-core/src/main/java
diff options
context:
space:
mode:
authorJulien Gouesse <[email protected]>2016-03-20 12:28:31 +0100
committerJulien Gouesse <[email protected]>2016-03-20 12:28:31 +0100
commit74255bd3aaee37331607c4f832732a6c4b2d0e65 (patch)
treee1a53df1da227d6037d9f5a4281ed514addabbab /ardor3d-core/src/main/java
parentab76aeccef2a2e3b368239baf119f6de0f402ddc (diff)
Uses the default loader when the type is unknown in ImageLoaderUtil instead of throwing a NullPointerException
Diffstat (limited to 'ardor3d-core/src/main/java')
-rw-r--r--ardor3d-core/src/main/java/com/ardor3d/image/util/ImageLoaderUtil.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/ardor3d-core/src/main/java/com/ardor3d/image/util/ImageLoaderUtil.java b/ardor3d-core/src/main/java/com/ardor3d/image/util/ImageLoaderUtil.java
index b12475a..bd404fa 100644
--- a/ardor3d-core/src/main/java/com/ardor3d/image/util/ImageLoaderUtil.java
+++ b/ardor3d-core/src/main/java/com/ardor3d/image/util/ImageLoaderUtil.java
@@ -3,7 +3,7 @@
*
* This file is part of Ardor3D.
*
- * Ardor3D is free software: you can redistribute it and/or modify it
+ * Ardor3D is free software: you can redistribute it and/or modify it
* under the terms of its license which may be found in the accompanying
* LICENSE file or at <http://www.ardor3d.com/LICENSE>.
*/
@@ -69,7 +69,7 @@ public abstract class ImageLoaderUtil {
Image imageData = null;
try {
- ImageLoader loader = loaders.get(type.toLowerCase());
+ ImageLoader loader = type == null ? null : loaders.get(type.toLowerCase());
if (loader == null) {
loader = defaultLoader;
}
@@ -92,7 +92,7 @@ public abstract class ImageLoaderUtil {
/**
* Register an ImageLoader to handle all files with a specific type. An ImageLoader can be registered to handle
* several formats without problems.
- *
+ *
* @param handler
* the handler to use
* @param types