Skip to content

Commit d26d5a7

Browse files
author
mwatson
committed
Fix possible null ref error
1 parent f1297d0 commit d26d5a7

File tree

6 files changed

+11
-4
lines changed

6 files changed

+11
-4
lines changed
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

Dlls/StackifyLib/StackifyLib.dll

0 Bytes
Binary file not shown.

Src/StackifyLib/Models/ErrorItem.cs

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -195,14 +195,21 @@ private void AddTraceFrames(Exception ex)
195195

196196
public static string GetMethodFullName(MethodBase method, bool simpleMethodNames = false)
197197
{
198+
if (method == null)
199+
return "Unknown";
200+
198201

199-
if (simpleMethodNames)
200-
{
201-
return method.ReflectedType.FullName + "." + method.Name;
202-
}
202+
203+
204+
203205

204206
if (method.ReflectedType != null)
205207
{
208+
if (simpleMethodNames)
209+
{
210+
return method.ReflectedType.FullName + "." + method.Name;
211+
}
212+
206213
try
207214
{
208215
string fullName = method.ReflectedType.FullName + "." +

0 commit comments

Comments
 (0)