diff options
author | Lluis Sanchez <lluis@xamarin.com> | 2019-11-26 20:43:05 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-26 20:43:05 +0300 |
commit | d52fba75b2aaca6f1dd908b97164e98363ef85a4 (patch) | |
tree | c10b65f71a8c9cdf1ee6d3c77f95b82e703bede9 /main | |
parent | 438f4d175f7d9d5549ea62cc8f95215e861006bb (diff) | |
parent | 796b7c57a16a2bd5d8382a639a22aaf352f9ecfb (diff) |
Merge pull request #9389 from mono/backport-pr-9373-to-release-8.4
[release-8.4] [Debugger] Handle NRE when adding a watch when not debugging
Diffstat (limited to 'main')
-rw-r--r-- | main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/ObjectValue/ObjectValueTreeViewController.cs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/ObjectValue/ObjectValueTreeViewController.cs b/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/ObjectValue/ObjectValueTreeViewController.cs index 0183375d4f..e981f67eb0 100644 --- a/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/ObjectValue/ObjectValueTreeViewController.cs +++ b/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/ObjectValue/ObjectValueTreeViewController.cs @@ -413,7 +413,15 @@ namespace MonoDevelop.Debugger } LoggingService.LogInfo ("Evaluating expression '{0}'", expression); - var node = Frame.EvaluateExpression (expression); + + ObjectValueNode node; + if (Frame != null) { + node = Frame.EvaluateExpression (expression); + } else { + var value = ObjectValue.CreateUnknown (expression); + node = new DebuggerObjectValueNode (value); + } + AddValue (node); ExpressionAdded?.Invoke (this, new ExpressionAddedEventArgs (expression)); |