Browse Source

Fix crash when starting ILSpy without /navigateTo.

pull/320/merge
Daniel Grunwald 14 years ago
parent
commit
bf5677c3cd
  1. 2
      ILSpy/ILSpy.csproj
  2. 21
      ILSpy/MainWindow.xaml.cs

2
ILSpy/ILSpy.csproj

@ -17,7 +17,7 @@ @@ -17,7 +17,7 @@
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
<ApplicationIcon>Images\ILSpy.ico</ApplicationIcon>
<RunCodeAnalysis>False</RunCodeAnalysis>
<StartArguments>/separate "C:\temp\decompiled\Mono.Cecil.dll"</StartArguments>
<StartArguments>/separate</StartArguments>
<SignAssembly>True</SignAssembly>
<AssemblyOriginatorKeyFile>..\NRefactory\ICSharpCode.NRefactory.snk</AssemblyOriginatorKeyFile>
<DelaySign>False</DelaySign>

21
ILSpy/MainWindow.xaml.cs

@ -294,16 +294,6 @@ namespace ICSharpCode.ILSpy @@ -294,16 +294,6 @@ namespace ICSharpCode.ILSpy
// NavigateTo == null and an assembly was given on the command-line:
// Select the newly loaded assembly
JumpToReference(commandLineLoadedAssemblies[0].AssemblyDefinition);
} else {
SharpTreeNode node = FindNodeByPath(sessionSettings.ActiveTreeViewPath, true);
if (node != null) {
SelectNode(node);
// only if not showing the about page, perform the update check:
ShowMessageIfUpdatesAvailableAsync(spySettings);
} else {
AboutPage.Display(decompilerTextView);
}
}
commandLineLoadedAssemblies.Clear(); // clear references once we don't need them anymore
}
@ -328,6 +318,17 @@ namespace ICSharpCode.ILSpy @@ -328,6 +318,17 @@ namespace ICSharpCode.ILSpy
ShowAssemblyList(this.assemblyList);
HandleCommandLineArgumentsAfterShowList(App.CommandLineArguments);
if (App.CommandLineArguments.NavigateTo == null && App.CommandLineArguments.AssembliesToLoad.Count != 1) {
SharpTreeNode node = FindNodeByPath(sessionSettings.ActiveTreeViewPath, true);
if (node != null) {
SelectNode(node);
// only if not showing the about page, perform the update check:
ShowMessageIfUpdatesAvailableAsync(spySettings);
} else {
AboutPage.Display(decompilerTextView);
}
}
}
#region Update Check

Loading…
Cancel
Save