MPO: add null override list check

experimental^2^2
Kirill Vainer 9 years ago
parent 5588e859cb
commit 21e63687cf
  1. 18
      jme3-core/src/main/java/com/jme3/material/Technique.java

@ -128,14 +128,16 @@ public final class Technique {
dynamicDefines.clear(); dynamicDefines.clear();
dynamicDefines.setAll(paramDefines); dynamicDefines.setAll(paramDefines);
for (MatParamOverride override : overrides) { if (overrides != null) {
if (!override.isEnabled()) { for (MatParamOverride override : overrides) {
continue; if (!override.isEnabled()) {
} continue;
Integer defineId = def.getShaderParamDefineId(override.name); }
if (defineId != null) { Integer defineId = def.getShaderParamDefineId(override.name);
if (def.getDefineIdType(defineId) == override.type) { if (defineId != null) {
dynamicDefines.set(defineId, override.type, override.value); if (def.getDefineIdType(defineId) == override.type) {
dynamicDefines.set(defineId, override.type, override.value);
}
} }
} }
} }

Loading…
Cancel
Save