Jelajahi Sumber

Fix null allocPos crash

trethaller 7 tahun lalu
induk
melakukan
50d9779a43
1 mengubah file dengan 2 tambahan dan 1 penghapusan
  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
 		}
 	}