diff options
author | Artem Bukhonov <artem.bukhonov@jetbrains.com> | 2017-02-10 23:47:51 +0300 |
---|---|---|
committer | Artem Bukhonov <Artem.Bukhonov@jetbrains.com> | 2017-03-11 21:29:37 +0300 |
commit | b29e9453337a600fce8fb59ea6ce19fe6d739376 (patch) | |
tree | 0e273f770daa1636d6010fb1e4cd9171eea1cbec /main/src/addins/MonoDevelop.Debugger.Win32 | |
parent | d9417d4cd2cffb510ab1b53b3099e80a29fce87c (diff) |
Fix NREs in GetParameters etc.
(cherry picked from commit 8b2b5f9)
Diffstat (limited to 'main/src/addins/MonoDevelop.Debugger.Win32')
-rw-r--r-- | main/src/addins/MonoDevelop.Debugger.Win32/Mono.Debugging.Win32/CorObjectAdaptor.cs | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/main/src/addins/MonoDevelop.Debugger.Win32/Mono.Debugging.Win32/CorObjectAdaptor.cs b/main/src/addins/MonoDevelop.Debugger.Win32/Mono.Debugging.Win32/CorObjectAdaptor.cs index 7653cd2b0f..e13e1d9402 100644 --- a/main/src/addins/MonoDevelop.Debugger.Win32/Mono.Debugging.Win32/CorObjectAdaptor.cs +++ b/main/src/addins/MonoDevelop.Debugger.Win32/Mono.Debugging.Win32/CorObjectAdaptor.cs @@ -1484,8 +1484,10 @@ namespace Mono.Debugging.Win32 if (met.IsStatic)
pos--;
- yield return CorDebugUtil.CallHandlingComExceptions (() => CreateParameterReference (ctx, pos, pi.Name),
+ var parameter = CorDebugUtil.CallHandlingComExceptions (() => CreateParameterReference (ctx, pos, pi.Name),
string.Format ("Get parameter {0} of {1}", pi.Name, met.Name));
+ if (parameter != null)
+ yield return parameter;
}
yield break;
}
@@ -1494,8 +1496,10 @@ namespace Mono.Debugging.Win32 int count = CorDebugUtil.CallHandlingComExceptions (() => ctx.Frame.GetArgumentCount (), "GetArgumentCount()", 0);
for (int n = 0; n < count; n++) {
int locn = n;
- yield return CorDebugUtil.CallHandlingComExceptions (() => CreateParameterReference (ctx, locn, "arg_" + (locn + 1)),
+ var parameter = CorDebugUtil.CallHandlingComExceptions (() => CreateParameterReference (ctx, locn, "arg_" + (locn + 1)),
string.Format ("Get parameter {0}", n));
+ if (parameter != null)
+ yield return parameter;
}
}
@@ -1608,8 +1612,10 @@ namespace Mono.Debugging.Win32 int count = ctx.Frame.GetLocalVariablesCount ();
for (int n = 0; n < count; n++) {
int locn = n;
- yield return CorDebugUtil.CallHandlingComExceptions (() => CreateLocalVariableReference (ctx, locn, "local_" + (locn + 1)),
+ var localVar = CorDebugUtil.CallHandlingComExceptions (() => CreateLocalVariableReference (ctx, locn, "local_" + (locn + 1)),
string.Format ("Get local variable {0}", locn));
+ if (localVar != null)
+ yield return localVar;
}
yield break;
}
|