From 21e63687cf2cc1b81d8db30114401ad84d661ddf Mon Sep 17 00:00:00 2001 From: Kirill Vainer Date: Tue, 8 Mar 2016 19:33:51 -0500 Subject: [PATCH] MPO: add null override list check --- .../main/java/com/jme3/material/Technique.java | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/jme3-core/src/main/java/com/jme3/material/Technique.java b/jme3-core/src/main/java/com/jme3/material/Technique.java index 3c6de557c..e6a8efdde 100644 --- a/jme3-core/src/main/java/com/jme3/material/Technique.java +++ b/jme3-core/src/main/java/com/jme3/material/Technique.java @@ -128,14 +128,16 @@ public final class Technique { dynamicDefines.clear(); dynamicDefines.setAll(paramDefines); - for (MatParamOverride override : overrides) { - if (!override.isEnabled()) { - continue; - } - Integer defineId = def.getShaderParamDefineId(override.name); - if (defineId != null) { - if (def.getDefineIdType(defineId) == override.type) { - dynamicDefines.set(defineId, override.type, override.value); + if (overrides != null) { + for (MatParamOverride override : overrides) { + if (!override.isEnabled()) { + continue; + } + Integer defineId = def.getShaderParamDefineId(override.name); + if (defineId != null) { + if (def.getDefineIdType(defineId) == override.type) { + dynamicDefines.set(defineId, override.type, override.value); + } } } }