mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-04-12 12:07:05 +00:00
fix: Fixing potential null ref
This commit is contained in:
parent
2a222289ca
commit
fd931b0b53
1 changed files with 5 additions and 1 deletions
|
|
@ -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));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue