SEBWIN-226: Ensured uninitialized dependencies won't crash event deregistration on client shutdown.
This commit is contained in:
parent
652a9a7e36
commit
204ba20242
1 changed files with 13 additions and 5 deletions
|
@ -177,16 +177,24 @@ namespace SafeExamBrowser.Client
|
|||
|
||||
private void DeregisterEvents()
|
||||
{
|
||||
Browser.ConfigurationDownloadRequested -= Browser_ConfigurationDownloadRequested;
|
||||
ClientHost.MessageBoxRequested -= ClientHost_MessageBoxRequested;
|
||||
ClientHost.PasswordRequested -= ClientHost_PasswordRequested;
|
||||
ClientHost.ReconfigurationDenied -= ClientHost_ReconfigurationDenied;
|
||||
ClientHost.Shutdown -= ClientHost_Shutdown;
|
||||
displayMonitor.DisplayChanged -= DisplayMonitor_DisplaySettingsChanged;
|
||||
processMonitor.ExplorerStarted -= ProcessMonitor_ExplorerStarted;
|
||||
runtime.ConnectionLost -= Runtime_ConnectionLost;
|
||||
taskbar.QuitButtonClicked -= Taskbar_QuitButtonClicked;
|
||||
windowMonitor.WindowChanged -= WindowMonitor_WindowChanged;
|
||||
|
||||
if (Browser != null)
|
||||
{
|
||||
Browser.ConfigurationDownloadRequested -= Browser_ConfigurationDownloadRequested;
|
||||
}
|
||||
|
||||
if (ClientHost != null)
|
||||
{
|
||||
ClientHost.MessageBoxRequested -= ClientHost_MessageBoxRequested;
|
||||
ClientHost.PasswordRequested -= ClientHost_PasswordRequested;
|
||||
ClientHost.ReconfigurationDenied -= ClientHost_ReconfigurationDenied;
|
||||
ClientHost.Shutdown -= ClientHost_Shutdown;
|
||||
}
|
||||
}
|
||||
|
||||
private void StartBrowser()
|
||||
|
|
Loading…
Reference in a new issue