From 1e857026acc7e7fd6015848735e5d1e649a9674e Mon Sep 17 00:00:00 2001 From: HoLLy Date: Fri, 17 Jul 2020 22:28:16 +0200 Subject: [PATCH] Fix nullability warning --- dnSpy/dnSpy/MainApp/App.xaml.cs | 2 +- dnSpy/dnSpy/MainApp/AppCommandLineArgs.cs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/dnSpy/dnSpy/MainApp/App.xaml.cs b/dnSpy/dnSpy/MainApp/App.xaml.cs index d6773e6c28..0cab15d429 100644 --- a/dnSpy/dnSpy/MainApp/App.xaml.cs +++ b/dnSpy/dnSpy/MainApp/App.xaml.cs @@ -325,7 +325,7 @@ Assembly[] GetAssemblies() { Assembly[] LoadExtensionAssemblies() { var dir = AppDirectories.BinDirectory; var unsortedFiles = GetExtensionFiles(dir); - if (!(args.ExtraExtensionDirectory is null)) + if (!string.IsNullOrEmpty(args.ExtraExtensionDirectory)) unsortedFiles = unsortedFiles.Concat(GetExtensionFiles(args.ExtraExtensionDirectory)); // Load the modules in a predictable order or multicore-JIT could stop recording. See diff --git a/dnSpy/dnSpy/MainApp/AppCommandLineArgs.cs b/dnSpy/dnSpy/MainApp/AppCommandLineArgs.cs index 47a8e15999..7559cf2828 100644 --- a/dnSpy/dnSpy/MainApp/AppCommandLineArgs.cs +++ b/dnSpy/dnSpy/MainApp/AppCommandLineArgs.cs @@ -77,6 +77,7 @@ public AppCommandLineArgs(string[] args) { ShowStartupTime = false; DebugAttachPid = 0; DebugAttachProcess = string.Empty; + ExtraExtensionDirectory = string.Empty; bool canParseCommands = true; for (int i = 0; i < args.Length; i++) {