浏览代码

prevent return true on cleanTextures if texture already disposed

Nicolas Cannasse 5 年之前
父节点
当前提交
037ae00031
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      h3d/impl/MemoryManager.hx

+ 1 - 1
h3d/impl/MemoryManager.hx

@@ -232,7 +232,7 @@ class MemoryManager {
 	public function cleanTextures( force = true ) {
 	public function cleanTextures( force = true ) {
 		textures.sort(sortByLRU);
 		textures.sort(sortByLRU);
 		for( t in textures ) {
 		for( t in textures ) {
-			if( t.realloc == null ) continue;
+			if( t.realloc == null || t.isDisposed() ) continue;
 			if( force || t.lastFrame < hxd.Timer.frameCount - 3600 ) {
 			if( force || t.lastFrame < hxd.Timer.frameCount - 3600 ) {
 				t.dispose();
 				t.dispose();
 				return true;
 				return true;