浏览代码

Fix null allocPos crash

trethaller 7 年之前
父节点
当前提交
50d9779a43
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      h3d/mat/Texture.hx

+ 2 - 1
h3d/mat/Texture.hx

@@ -261,7 +261,8 @@ class Texture {
 		if( t != null ) {
 			mem.deleteTexture(this);
 			#if debug
-			this.allocPos.customParams = ["#DISPOSED"];
+			if(this.allocPos != null)
+				this.allocPos.customParams = ["#DISPOSED"];
 			#end
 		}
 	}