diff options
author | Jeffrey Stedfast <jestedfa@microsoft.com> | 2020-05-04 17:26:09 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-04 17:26:09 +0300 |
commit | ccadc650051f1844c94e2b12933c57da2a8092d9 (patch) | |
tree | a512ac5586bddd20a364f0d7f9428b228b0453d2 /mcs | |
parent | 5270d49f713a5ae9f44539e5a98ef58866d68f26 (diff) |
[Mono.Debugger.Soft] Fixed NRE in MethodMirror.FullName when param_info is not yet cached (#19675)
If param_info has not yet been fetched, then the FullName property
will throw a NRE when accessed.
Fixes https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1112185/
Diffstat (limited to 'mcs')
-rw-r--r-- | mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/MethodMirror.cs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/MethodMirror.cs b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/MethodMirror.cs index f5be0f8e2cd..3c48682f95b 100644 --- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/MethodMirror.cs +++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/MethodMirror.cs @@ -70,9 +70,10 @@ namespace Mono.Debugger.Soft sb.Append(Name); sb.Append(" "); sb.Append("("); - for (var i = 0; i < param_info.Length; i++) { - sb.Append(param_info[i].ParameterType.Name); - if (i != param_info.Length - 1) + var parameters = GetParameters (); + for (var i = 0; i < parameters.Length; i++) { + sb.Append(parameters[i].ParameterType.Name); + if (i != parameters.Length - 1) sb.Append(", "); } sb.Append(")"); |