diff options
author | Alan McGovern <alan.mcgovern@gmail.com> | 2011-10-05 21:18:49 +0400 |
---|---|---|
committer | Alan McGovern <alan.mcgovern@gmail.com> | 2011-10-05 21:22:13 +0400 |
commit | 096ef4c60b85960cb4cfac236e29ea289583868e (patch) | |
tree | 263f816f3524b70b4bcb1a5658abf75fa0d14d04 /main/src/addins/MonoDevelop.AssemblyBrowser | |
parent | f3e2e48d83fd1399dad269e303f9f3fff1745828 (diff) |
[AssemblyBrowser] Fix an issue if the browser is closed before loading completes
Prevent a null reference exception propagating to the user and blowing up.
Fixes #406.
Diffstat (limited to 'main/src/addins/MonoDevelop.AssemblyBrowser')
-rw-r--r-- | main/src/addins/MonoDevelop.AssemblyBrowser/MonoDevelop.AssemblyBrowser/AssemblyBrowserWidget.cs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/main/src/addins/MonoDevelop.AssemblyBrowser/MonoDevelop.AssemblyBrowser/AssemblyBrowserWidget.cs b/main/src/addins/MonoDevelop.AssemblyBrowser/MonoDevelop.AssemblyBrowser/AssemblyBrowserWidget.cs index b78975c3e5..e36b156ec9 100644 --- a/main/src/addins/MonoDevelop.AssemblyBrowser/MonoDevelop.AssemblyBrowser/AssemblyBrowserWidget.cs +++ b/main/src/addins/MonoDevelop.AssemblyBrowser/MonoDevelop.AssemblyBrowser/AssemblyBrowserWidget.cs @@ -958,6 +958,8 @@ namespace MonoDevelop.AssemblyBrowser public void Open (string url) { ITreeNavigator nav = SearchMember (url); + if (definitions == null) // we've been disposed + return; if (nav == null) { foreach (DomCecilCompilationUnit definition in definitions.ToArray ()) { foreach (AssemblyNameReference assemblyNameReference in definition.AssemblyDefinition.MainModule.AssemblyReferences) { |