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.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);
}
}
}
}

Loading…
Cancel
Save