Explorar o código

SpatialRendererFX: fix null access on remove in editor

lviguier hai 3 meses
pai
achega
f2c1fbc6ab
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      hrt/prefab/rfx/SpatialRendererFX.hx

+ 1 - 1
hrt/prefab/rfx/SpatialRendererFX.hx

@@ -22,7 +22,7 @@ class SPRFXObject extends h3d.scene.Object {
 
 	override function onRemove() {
 		super.onRemove();
-		this.renderer.effects.remove(sprfx);
+		this.renderer?.effects?.remove(sprfx);
 	}
 }