Skip to content

Commit b442384

Browse files
committed
fix animation dispose crash
1 parent 013042e commit b442384

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Intersect.Client.Core/Entities/Entity.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -581,7 +581,10 @@ public void RemoveAnimations(IEnumerable<Animation> animations, bool dispose = t
581581
{
582582
if (dispose)
583583
{
584-
animation.Dispose();
584+
if (!animation.IsDisposed)
585+
{
586+
animation.Dispose();
587+
}
585588
}
586589

587590
_ = TryRemoveAnimation(animation);

0 commit comments

Comments
 (0)