SEBWIN-415: Fixed client hang after startup failure.

This commit is contained in:
Damian Büchel 2020-08-06 14:06:29 +02:00
parent 9817da759c
commit 63e8f9b45e
3 changed files with 9 additions and 2 deletions

View file

@ -874,8 +874,11 @@ namespace SafeExamBrowser.Client.UnitTests
[TestMethod]
public void Shutdown_MustNotFailIfDependenciesAreNull()
{
context.AppConfig = null;
context.Browser = null;
context.ClientHost = null;
context.Server = null;
context.Settings = null;
sut.Terminate();
}

View file

@ -156,6 +156,10 @@
<Project>{6d563a30-366d-4c35-815b-2c9e6872278b}</Project>
<Name>SafeExamBrowser.Monitoring.Contracts</Name>
</ProjectReference>
<ProjectReference Include="..\SafeExamBrowser.Server.Contracts\SafeExamBrowser.Server.Contracts.csproj">
<Project>{db701e6f-bddc-4cec-b662-335a9dc11809}</Project>
<Name>SafeExamBrowser.Server.Contracts</Name>
</ProjectReference>
<ProjectReference Include="..\SafeExamBrowser.Settings\SafeExamBrowser.Settings.csproj">
<Project>{30b2d907-5861-4f39-abad-c4abf1b3470e}</Project>
<Name>SafeExamBrowser.Settings</Name>

View file

@ -251,12 +251,12 @@ namespace SafeExamBrowser.Client
private void CloseShell()
{
if (Settings.ActionCenter.EnableActionCenter)
if (Settings?.ActionCenter.EnableActionCenter == true)
{
actionCenter.Close();
}
if (Settings.Taskbar.EnableTaskbar)
if (Settings?.Taskbar.EnableTaskbar == true)
{
taskbar.Close();
}