Преглед изворни кода

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 ) {
 		textures.sort(sortByLRU);
 		for( t in textures ) {
-			if( t.realloc == null ) continue;
+			if( t.realloc == null || t.isDisposed() ) continue;
 			if( force || t.lastFrame < hxd.Timer.frameCount - 3600 ) {
 				t.dispose();
 				return true;