fixed NPE when you try to remove an unused asset loader.

empirephoenix-patch-1
javasabr 7 years ago committed by Rémy Bouquet
parent 22bf08d9e7
commit b9e3788ffa
  1. 2
      jme3-core/src/main/java/com/jme3/asset/ImplHandler.java

@ -32,6 +32,7 @@
package com.jme3.asset; package com.jme3.asset;
import com.jme3.asset.cache.AssetCache; import com.jme3.asset.cache.AssetCache;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.Iterator; import java.util.Iterator;
@ -282,6 +283,7 @@ final class ImplHandler {
ImplThreadLocal local = classToLoaderMap.get(loaderType); ImplThreadLocal local = classToLoaderMap.get(loaderType);
// Remove it from the class->loader map // Remove it from the class->loader map
classToLoaderMap.remove(loaderType); classToLoaderMap.remove(loaderType);
if (local == null) return;
// Remove it from the extension->loader map // Remove it from the extension->loader map
for (String extension : local.getExtensions()){ for (String extension : local.getExtensions()){
extensionToLoaderMap.remove(extension); extensionToLoaderMap.remove(extension);

Loading…
Cancel
Save