瀏覽代碼

Fix null access on pass selfShaders.

clementlandrin 2 年之前
父節點
當前提交
2bb6d00052
共有 1 個文件被更改,包括 2 次插入1 次删除
  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;
 	}