Parcourir la source

temp fix for addShader(null) (regression)

ncannasse il y a 7 ans
Parent
commit
195af8cd15
1 fichiers modifiés avec 2 ajouts et 0 suppressions
  1. 2 0
      h3d/mat/Pass.hx

+ 2 - 0
h3d/mat/Pass.hx

@@ -107,6 +107,8 @@ class Pass implements hxd.impl.Serializable {
 	}
 
 	public function addShader<T:hxsl.Shader>(s:T) : T {
+		// throwing an exception will require NG GameServer review
+		if( s == null ) return null;
 		shaders = hxsl.ShaderList.addSort(s, shaders);
 		return s;
 	}