浏览代码

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

Cyle 12 年之前
父节点
当前提交
84af156441
共有 1 个文件被更改,包括 1 次插入1 次删除
  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() {
-        if (this._texture === undefined) {
+        if (this._texture === undefined || this._texture === null) {
             return;
         }
         var texturesCache = this._scene.getEngine().getLoadedTexturesCache();