CA-339374: Changed order of control disposal. Also, fixed wrong title of the undocked console.

Disposing the vncTabView disconnects the RdpClient and should not be called after
base.Dispose() is called on VNCView, because the latter has released the COM objects
and causes an InvalidComObjectException to be thrown.

Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
This commit is contained in:
Konstantina Chremmou 2020-05-31 01:43:56 +01:00 committed by Mihaela Stoica
parent 797605d2e7
commit 9ec3dc3127
2 changed files with 8 additions and 9 deletions

View File

@ -17,22 +17,21 @@ namespace XenAdmin.ConsoleView
UnregisterEventListeners();
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
if (this.undockedForm != null)
{
undockedForm.Hide();
undockedForm.Dispose();
}
if (disposing && this.vncTabView != null)
if (disposing)
{
this.vncTabView.Dispose();
if (vncTabView != null && !vncTabView.IsDisposed)
vncTabView.Dispose();
if (components != null)
components.Dispose();
}
base.Dispose(disposing);
}
#region Component Designer generated code

View File

@ -234,7 +234,7 @@ namespace XenAdmin.ConsoleView
{
if (e.PropertyName == "name_label" && undockedForm != null)
{
undockedForm.Text = source.name_label;
undockedForm.Text = UndockedWindowTitle(source);
}
}