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

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