Quellcode durchsuchen

- fixed issue when disposing of a material that never set a texture

Cyle vor 12 Jahren
Ursprung
Commit
84af156441
1 geänderte Dateien mit 1 neuen und 1 gelöschten Zeilen
  1. 1 1
      Babylon/Materials/textures/babylon.baseTexture.js

+ 1 - 1
Babylon/Materials/textures/babylon.baseTexture.js

@@ -61,7 +61,7 @@
     };
     };
 
 
     BABYLON.BaseTexture.prototype.releaseInternalTexture = function() {
     BABYLON.BaseTexture.prototype.releaseInternalTexture = function() {
-        if (this._texture === undefined) {
+        if (this._texture === undefined || this._texture === null) {
             return;
             return;
         }
         }
         var texturesCache = this._scene.getEngine().getLoadedTexturesCache();
         var texturesCache = this._scene.getEngine().getLoadedTexturesCache();