sebavan %!s(int64=5) %!d(string=hai) anos
pai
achega
25fbad5450
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/Materials/Textures/renderTargetTexture.ts

+ 1 - 1
src/Materials/Textures/renderTargetTexture.ts

@@ -81,7 +81,7 @@ export class RenderTargetTexture extends Texture {
 
             var result = oldPush.apply(array, items);
 
-            if (wasEmpty) {
+            if (wasEmpty && this.getScene()) {
                 this.getScene()!.meshes.forEach((mesh) => {
                     mesh._markSubMeshesAsLightDirty();
                 });