aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiguel Costa <miguel.costa@qt.io>2019-09-24 15:16:29 +0200
committerMiguel Costa <miguel.costa@qt.io>2019-09-30 10:30:32 +0000
commit01556f00258a228c15ed67a8cc237b7250beb877 (patch)
tree80796e81363243d66bbfe0acf24e39c4f01de1ce
parentaace5b9acbb4798f91019a2c0738f8099ed3de30 (diff)
Fix modules dialog not shown if property is empty
Fixed a bug in the Qt settings property page where the modules selection dialog would not be shown if the corresponding field was empty. Change-Id: I678cda4d9af408f6701c68f6dbe27c2407408061 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
-rw-r--r--src/qtvstools/QtMsBuild/Components/QtModulesEditor.cs9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/qtvstools/QtMsBuild/Components/QtModulesEditor.cs b/src/qtvstools/QtMsBuild/Components/QtModulesEditor.cs
index d7670d49..e895006d 100644
--- a/src/qtvstools/QtMsBuild/Components/QtModulesEditor.cs
+++ b/src/qtvstools/QtMsBuild/Components/QtModulesEditor.cs
@@ -72,9 +72,12 @@ namespace QtVsTools.QtMsBuild
});
}
- var currentModuleVars = currentValue.ToString().Split(';');
- var currentModules = modules.Values
- .Where(x => x.Vars.All(y => currentModuleVars.Contains(y)));
+ var currentModules = Enumerable.Empty<Module>();
+ if (currentValue != null) {
+ var currentModuleVars = currentValue.ToString().Split(';');
+ currentModules = modules.Values
+ .Where(x => x.Vars.All(y => currentModuleVars.Contains(y)));
+ }
await Vsix.Instance.JoinableTaskFactory.SwitchToMainThreadAsync();