SEBWIN-643: Fixed exception due to missing check when loading version restrictions in configuration tool.

This commit is contained in:
Damian Büchel 2023-07-04 11:23:57 +02:00
parent 3dd023b285
commit 37e3950a6f

View file

@ -838,7 +838,7 @@ namespace SebWindowsConfig
checkBoxEnforceBuiltinDisplay.Checked = (Boolean) SEBSettings.settingsCurrent[SEBSettings.KeyAllowedDisplayBuiltinEnforce];
checkBoxAllowedDisplayIgnoreError.Checked = (Boolean) SEBSettings.settingsCurrent[SEBSettings.KeyAllowedDisplayIgnoreFailure];
if (SEBSettings.settingsCurrent[SEBSettings.KeyVersionRestrictions] is ListObj restrictions)
if (SEBSettings.settingsCurrent.TryGetValue(SEBSettings.KeyVersionRestrictions, out var value) && value is ListObj restrictions)
{
versionRestrictionsTextBox.Clear();