diff options
Diffstat (limited to 'modules/mono/glue/cs_files/DebuggingUtils.cs')
| -rw-r--r-- | modules/mono/glue/cs_files/DebuggingUtils.cs | 10 | 
1 files changed, 8 insertions, 2 deletions
diff --git a/modules/mono/glue/cs_files/DebuggingUtils.cs b/modules/mono/glue/cs_files/DebuggingUtils.cs index ced78f658d..ffaaf00837 100644 --- a/modules/mono/glue/cs_files/DebuggingUtils.cs +++ b/modules/mono/glue/cs_files/DebuggingUtils.cs @@ -26,10 +26,16 @@ namespace Godot              MethodBase methodBase = frame.GetMethod(); +            if (methodBase == null) +            { +                methodDecl = string.Empty; +                return; +            } +              StringBuilder sb = new StringBuilder(); -            if (methodBase is MethodInfo methodInfo) -                sb.AppendTypeName(methodInfo.ReturnType); +            if (methodBase is MethodInfo) +                sb.AppendTypeName(((MethodInfo)methodBase).ReturnType);              sb.Append(methodBase.DeclaringType.FullName);              sb.Append(".");  |