Merge pull request #20 from MihaelaStoica/master

CA-127974: Added more checks to prevent XenCenter crash while closing [X...
This commit is contained in:
Gabor Apati-Nagy 2014-03-05 12:11:55 +01:00
commit f9a1e7cd63
2 changed files with 5 additions and 2 deletions

View File

@ -337,6 +337,9 @@ namespace XenAdmin.Controls.MainWindowControls
private void RefreshTreeView()
{
if (Disposing || IsDisposed || Program.Exiting)
return;
Program.Invoke(this, () =>
{
if (ignoreRefreshTreeView > 0)

View File

@ -596,8 +596,8 @@ namespace XenAdmin
Messages.MESSAGEBOX_PROGRAM_UNEXPECTED_TITLE));
// CA-44733
if (Program.MainWindow != null && !Program.MainWindow.InvokeRequired)
d.ShowDialog(Program.MainWindow);
if (MainWindow != null && !IsExiting(MainWindow) && !MainWindow.InvokeRequired)
d.ShowDialog(MainWindow);
else
d.ShowDialog();
}