Skip to content

Commit

Permalink
avoid description window to delete control twice (#1835)
Browse files Browse the repository at this point in the history
  • Loading branch information
WeylonSantana authored Aug 14, 2023
1 parent 2df78e1 commit 34cc790
Showing 1 changed file with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;

using Intersect.Client.Core;
using Intersect.Client.Framework.Gwen.Control;
Expand Down Expand Up @@ -86,7 +86,15 @@ protected virtual void GenerateComponents()
/// <summary>
/// Dispose of the object.
/// </summary>
public virtual void Dispose() => mParent.RemoveChild(mContainer, true);
public virtual void Dispose()
{
if(!mParent.Children.Contains(mContainer))
{
return;
}

mParent.RemoveChild(mContainer, true);
}

/// <summary>
/// Load the Json layout of the current component.
Expand Down

0 comments on commit 34cc790

Please sign in to comment.