From 0cff50ef696aa53fb7c46a9a737b7cf3a05b7b9b 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 --- Packages/src/Runtime/Utilities/ParticleSystemExtensions.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Packages/src/Runtime/Utilities/ParticleSystemExtensions.cs b/Packages/src/Runtime/Utilities/ParticleSystemExtensions.cs index b9c08a0..709fce8 100644 --- a/Packages/src/Runtime/Utilities/ParticleSystemExtensions.cs +++ b/Packages/src/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++)