From 63ec8f61e38190331c072a145df82c53c7e75d53 Mon Sep 17 00:00:00 2001 From: mob-sakai <12690315+mob-sakai@users.noreply.github.com> Date: Fri, 14 Mar 2025 19:43:48 +0900 Subject: [PATCH] fix: NRE on enable close #359 --- Runtime/Utilities/ParticleSystemExtensions.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Runtime/Utilities/ParticleSystemExtensions.cs b/Runtime/Utilities/ParticleSystemExtensions.cs index b9c08a0..709fce8 100644 --- a/Runtime/Utilities/ParticleSystemExtensions.cs +++ b/Runtime/Utilities/ParticleSystemExtensions.cs @@ -187,6 +187,8 @@ namespace Coffee.UIParticleInternal public static bool IsSubEmitterOf(this ParticleSystem self, ParticleSystem parent) { + if (!self || !parent) return false; + var subEmitters = parent.subEmitters; var count = subEmitters.subEmittersCount; for (var i = 0; i < count; i++)