Browse Source

SpatialRendererFX: fix null access on remove in editor

lviguier 3 months ago
parent
commit
f2c1fbc6ab
1 changed files with 1 additions and 1 deletions
  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);
 	}
 }