Skip to content

Commit

Permalink
CCW code was mistakenly returning an IUnknown as an IInspectable (#349)
Browse files Browse the repository at this point in the history
  • Loading branch information
Scottj1s authored Jul 17, 2020
1 parent c5efd9f commit 59ba77e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion WinRT.Runtime/Marshalers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -919,7 +919,10 @@ public static IObjectReference CreateMarshaler(object o, bool unwrapObject = tru
{
return objRef.As<IInspectable.Vftbl>();
}
return ComWrappersSupport.CreateCCWForObject(o);
using (var ccw = ComWrappersSupport.CreateCCWForObject(o))
{
return ccw.As<IInspectable.Vftbl>();
}
}

public static IntPtr GetAbi(IObjectReference objRef) =>
Expand Down

0 comments on commit 59ba77e

Please sign in to comment.