mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-02-16 21:24:58 +00:00
fix: Fixing potential null ref
This commit is contained in:
@@ -215,7 +215,11 @@ namespace ICD.Common.Utils
|
|||||||
|
|
||||||
private string BuildName()
|
private string BuildName()
|
||||||
{
|
{
|
||||||
return string.Format("{0}.{1}", MethodInfo.DeclaringType.Name, MethodInfo.GetSignature(true));
|
Type declaring = MethodInfo.DeclaringType;
|
||||||
|
|
||||||
|
return declaring == null
|
||||||
|
? MethodInfo.GetSignature(true)
|
||||||
|
: string.Format("{0}.{1}", declaring.Name, MethodInfo.GetSignature(true));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user