Skip to content
Browse files

Fixed crash when closing Add Reference dialog while search is still r…

…unning.
  • Loading branch information...
1 parent c27f08f commit a8a16ef26f0973b6278442b23049b845d0662f91 @dgrunwald dgrunwald committed Aug 28, 2011
Showing with 4 additions and 0 deletions.
  1. +4 −0 src/Main/Base/Project/Src/Gui/Dialogs/ReferenceDialog/GacReferencePanel.cs
View
4 src/Main/Base/Project/Src/Gui/Dialogs/ReferenceDialog/GacReferencePanel.cs
@@ -154,6 +154,10 @@ void searchButton_Click(object sender, EventArgs e)
void searchTask_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
{
+ if (this.IsDisposed) {
+ // avoid crash when dialog is closed before search is completed
+ return;
+ }
searchButton.Text = "Search"; this.toolTip.SetToolTip(searchButton, searchButton.Text);
filterTextBox.ReadOnly = false;
if (resultList != null && resultList.Count > 0) {

0 comments on commit a8a16ef

Please sign in to comment.
Something went wrong with that request. Please try again.