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

Commit 4945d05

Browse files
authored
Merge pull request #1059 from jkoritzinsky/Fix-MediaAttributes-Type-Check
Fix type check in MediaAttributes to work correctly with an interface type.
2 parents a525e44 + 9787b07 commit 4945d05

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)