Skip to content

Commit

Permalink
Crashfix when AddPrim() is called on closed console
Browse files Browse the repository at this point in the history
  • Loading branch information
cinderblocks committed Feb 17, 2022
1 parent 671cc37 commit c8f3749
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Radegast/GUI/Consoles/ObjectsConsole.cs
Original file line number Diff line number Diff line change
Expand Up @@ -670,7 +670,9 @@ private void AddPrim(Primitive prim)
lock (Prims)
{
string name = GetObjectName(prim);
if (!Prims.Contains(prim) && (txtSearch.Text.Length == 0 || name.ToLower().Contains(txtSearch.Text.ToLower())))
if (!Prims.Contains(prim)
&& txtSearch.IsHandleCreated
&& (txtSearch.Text.Length == 0 || name.ToLower().Contains(txtSearch.Text.ToLower())))
{
Prims.Add(prim);
if (prim.Properties == null)
Expand Down

0 comments on commit c8f3749

Please sign in to comment.