* 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
This commit is contained in:
parent
230398c45b
commit
b53a825d35
@ -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…
x
Reference in New Issue
Block a user