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

fix(renderTargetTexture) : Fix null texture error.

pierre пре 7 година
родитељ
комит
77b3516084
1 измењених фајлова са 3 додато и 0 уклоњено
  1. 3 0
      src/Materials/Textures/babylon.renderTargetTexture.ts

+ 3 - 0
src/Materials/Textures/babylon.renderTargetTexture.ts

@@ -496,6 +496,9 @@
         }
 
         protected unbindFrameBuffer(engine: Engine, faceIndex: number): void {
+            if (!this._texture) {
+                return;
+            }
             engine.unBindFramebuffer(this._texture, this.isCube, () => {
                 this.onAfterRenderObservable.notifyObservers(faceIndex);
             });