From 56aabe3facfe9bd27be870f3fc21d0068cf99578 Mon Sep 17 00:00:00 2001 From: Nehon Date: Fri, 27 Feb 2015 18:37:27 +0100 Subject: [PATCH] Fixed a NPE in MaterialDebugAppState when a Pass was declared in a filter but not instantiated. --- .../src/main/java/com/jme3/util/MaterialDebugAppState.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jme3-core/src/main/java/com/jme3/util/MaterialDebugAppState.java b/jme3-core/src/main/java/com/jme3/util/MaterialDebugAppState.java index 9fb6c9e54..1c512e41b 100644 --- a/jme3-core/src/main/java/com/jme3/util/MaterialDebugAppState.java +++ b/jme3-core/src/main/java/com/jme3/util/MaterialDebugAppState.java @@ -317,7 +317,7 @@ public class MaterialDebugAppState extends AbstractAppState { if (field.getType().isInstance(p)) { field.setAccessible(true); p = (Filter.Pass) field.get(filter); - if (p.getPassMaterial() != null) { + if (p!= null && p.getPassMaterial() != null) { Material mat = reloadMaterial(p.getPassMaterial()); if (mat == null) { return;