Browse Source

Fixed a tiny uncaught Exception in ShaderNodes when an non existent Shader was referenced.

MeFisto94 9 years ago
parent
commit
2a046d9797

+ 4 - 0
jme3-materialeditor/src/com/jme3/gde/materials/MaterialPreviewRenderer.java

@@ -4,6 +4,7 @@
  */
 package com.jme3.gde.materials;
 
+import com.jme3.asset.AssetNotFoundException;
 import com.jme3.asset.MaterialKey;
 import com.jme3.gde.core.assets.ProjectAssetManager;
 import com.jme3.gde.core.scene.PreviewRequest;
@@ -201,6 +202,9 @@ public class MaterialPreviewRenderer implements SceneListener {
             //the printStackTrace is intended, it will show up in debug mode, but won't be displayed in standzrd mode
             npe.printStackTrace();
             return null;
+        } catch (AssetNotFoundException a) {
+            smartLog("Could not fully load Shader: Missing File: {0}", a.getMessage());
+            return null;
         }
 
         //Logger.getLogger(MaterialDebugAppState.class.getName()).log(Level.INFO, "Material succesfully reloaded");