Skip to content

Commit

Permalink
Don't crash when "ShaderGenerationInfo" is null.
Browse files Browse the repository at this point in the history
Important: Find out why said info is null...
  • Loading branch information
MeFisto94 committed Feb 27, 2016
1 parent d0c7bd9 commit 4b177ca
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions jme3-core/src/main/java/com/jme3/shader/ShaderGenerator.java
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,10 @@ public Shader generateShader() {
DefineList defines = technique.getAllDefines();
TechniqueDef def = technique.getDef();
ShaderGenerationInfo info = def.getShaderGenerationInfo();

if (info == null){
throw new UnsupportedOperationException("The Techniques' ShaderGenerationInfo was null. TODO: FIX");
}

String vertexSource = buildShader(def.getShaderNodes(), info, ShaderType.Vertex);
String fragmentSource = buildShader(def.getShaderNodes(), info, ShaderType.Fragment);
Expand Down

0 comments on commit 4b177ca

Please sign in to comment.