Browse Source

Fix null access on pass selfShaders.

clementlandrin 2 years ago
parent
commit
2bb6d00052
1 changed files with 2 additions and 1 deletions
  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;
 	}