Explorar el Código

Fix null access on pass selfShaders.

clementlandrin hace 2 años
padre
commit
2bb6d00052
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. 2 1
      h3d/mat/Pass.hx

+ 2 - 1
h3d/mat/Pass.hx

@@ -310,7 +310,8 @@ class Pass {
 			sl = sl.next;
 		}
 		selfShadersCache = shaders;
-		prev.next = selfShadersCache;
+		if ( prev != null )
+			prev.next = selfShadersCache;
 		return selfShaders;
 	}