Quick fix for issue 303

I’ve reported a npe bug in Technique.loadShader()

This will be thrown if no world parameters have been defined for a material.



This can easily be fixed by checking for null first before accessing the world bindings.



I’ve changed

[patch]

worldBindUniforms.clear();

for (UniformBinding binding : def.getWorldBindings()) {

Uniform uniform = shader.getUniform(“g_” + binding.name());

uniform.setBinding(binding);

if (uniform != null) {

worldBindUniforms.add(uniform);



}

}

[/patch]



with

[patch]

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



}

}

}

[/patch]



I’ve tested it and it seems to solve the issue.