Skip to content

Commit

Permalink
Goign t from OOBE to this, this Additional Options was null and crash…
Browse files Browse the repository at this point in the history
…ed. (#9975)
  • Loading branch information
crutkas committed Mar 2, 2021
1 parent b9ee317 commit a123502
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/modules/launcher/Plugins/Microsoft.Plugin.Indexer/Main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -227,8 +227,16 @@ public List<ContextMenuResult> LoadContextMenus(Result selectedResult)

public void UpdateSettings(PowerLauncherPluginSettings settings)
{
var option = settings.AdditionalOptions.FirstOrDefault(x => x.Key == DisableDriveDetectionWarning);
_driveDetection.IsDriveDetectionWarningCheckBoxSelected = option == null ? false : option.Value;
var driveDetection = false;

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()
Expand Down

0 comments on commit a123502

Please sign in to comment.