Skip to content
This repository was archived by the owner on Mar 30, 2019. It is now read-only.

Commit 9787b07

Browse files
committed
Fix type check in MediaAttributes as mentioned in #1039.
1 parent a525e44 commit 9787b07

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Source/SharpDX.MediaFoundation/MediaAttributes.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ public unsafe void Set<T>(System.Guid guidKey, T value)
275275
return;
276276
}
277277

278-
if (typeof(T) == typeof(ComObject) || typeof(T).GetTypeInfo().IsSubclassOf(typeof(IUnknown)))
278+
if (typeof(T) == typeof(ComObject) || typeof(IUnknown).GetTypeInfo().IsAssignableFrom(typeof(T).GetTypeInfo()))
279279
{
280280
Set(guidKey, ((IUnknown)(object)value));
281281
return;

0 commit comments

Comments
 (0)