* Prevent crash when material technique has no world bindings defined. Fixes issue 454

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9129 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
Sha..om 13 years ago
parent 230398c45b
commit b53a825d35
  1. 3
      engine/src/core/com/jme3/material/Technique.java

@ -228,12 +228,13 @@ public class Technique implements Savable {
// register the world bound uniforms
worldBindUniforms.clear();
if (def.getWorldBindings() != null) {
for (UniformBinding binding : def.getWorldBindings()) {
Uniform uniform = shader.getUniform("g_" + binding.name());
uniform.setBinding(binding);
if (uniform != null) {
worldBindUniforms.add(uniform);
}
}
}

Loading…
Cancel
Save