Skip to content

Commit

Permalink
fix: SetDirtyAndNotify causes null exceptions on GameObject delete
Browse files Browse the repository at this point in the history
close #192
  • Loading branch information
mob-sakai committed Sep 6, 2024
1 parent c68af83 commit 706f022
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Packages/src/Runtime/SoftMask.cs
Original file line number Diff line number Diff line change
Expand Up @@ -598,6 +598,8 @@ public override Material GetModifiedMaterial(Material baseMaterial)

private void SetDirtyAndNotify()
{
if (isDirty || !this || !isActiveAndEnabled) return;

SetSoftMaskDirty();
MaskUtilities.NotifyStencilStateChanged(this);
}
Expand Down

0 comments on commit 706f022

Please sign in to comment.