[PT Run] Check for invalid plugin additional option (#13632)

* Check for dictionary null key value

* Combine condition in a single if statement
This commit is contained in:
Stefan Markovic 2021-10-05 15:18:45 +02:00 committed by GitHub
parent 59aa9c5474
commit 063beddb01
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -227,7 +227,7 @@ namespace PowerLauncher
var defaultOptions = defaultAdditionalOptions.ToDictionary(x => x.Key);
foreach (var option in additionalOptions)
{
if (defaultOptions.ContainsKey(option.Key))
if (option.Key != null && defaultOptions.ContainsKey(option.Key))
{
defaultOptions[option.Key].Value = option.Value;
}