Skip to content

Commit

Permalink
NullCheck for currentActiveContent
Browse files Browse the repository at this point in the history
currentActiveContent can be null and will throw an exception
  • Loading branch information
bbuerger authored Feb 1, 2022
1 parent dd9d2fd commit 84a52b8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions source/Components/AvalonDock/Controls/DropTarget.cs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,8 @@ public void Drop(LayoutFloatingWindow floatingWindow)
var fwAsDocument = floatingWindow as LayoutDocumentFloatingWindow;
this.Drop(fwAsDocument);
}

if (currentActiveContent == null)
return;
Dispatcher.BeginInvoke(new Action(() =>
{
currentActiveContent.IsSelected = false;
Expand Down Expand Up @@ -149,4 +150,4 @@ public void DragLeave()

#endregion Public Methods
}
}
}

0 comments on commit 84a52b8

Please sign in to comment.