Browse Source

Fix null allocPos crash

trethaller 7 năm trước cách đây
mục cha
commit
50d9779a43
1 tập tin đã thay đổi với 2 bổ sung1 xóa
  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
 		}
 	}