Goign t from OOBE to this, this Additional Options was null and crashed. (#9975)

This commit is contained in:
Clint Rutkas
2021-03-02 08:04:08 -08:00
committed by GitHub
parent b9ee317ab9
commit a12350274b

View File

@@ -226,9 +226,17 @@ namespace Microsoft.Plugin.Indexer
}
public void UpdateSettings(PowerLauncherPluginSettings settings)
{
var driveDetection = false;
if (settings.AdditionalOptions != null)
{
var option = settings.AdditionalOptions.FirstOrDefault(x => x.Key == DisableDriveDetectionWarning);
_driveDetection.IsDriveDetectionWarningCheckBoxSelected = option == null ? false : option.Value;
driveDetection = option == null ? false : option.Value;
}
_driveDetection.IsDriveDetectionWarningCheckBoxSelected = driveDetection;
}
public Control CreateSettingPanel()