Skip to content

Commit b1ecedd

Browse files
authored
Guard against potential null (#1695)
1 parent 15af469 commit b1ecedd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/WinRT.Runtime/ComWrappersSupport.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -650,7 +650,8 @@ internal static Type GetRuntimeClassForTypeCreation(IInspectable inspectable, Ty
650650
// isn't already added. On JIT, we can construct it at runtime.
651651
if (!RuntimeFeature.IsDynamicCodeCompiled)
652652
{
653-
if (implementationType.IsInterface &&
653+
if (implementationType != null &&
654+
implementationType.IsInterface &&
654655
implementationType.IsGenericType &&
655656
!TypedObjectFactoryCacheForType.ContainsKey(implementationType))
656657
{

0 commit comments

Comments
 (0)