Signed-off-by: Ziqing Hui zhui@codeweavers.com --- dlls/d2d1/d2d1_private.h | 1 + dlls/d2d1/effect.c | 2 ++ 2 files changed, 3 insertions(+)
diff --git a/dlls/d2d1/d2d1_private.h b/dlls/d2d1/d2d1_private.h index bc07378bd20..8077f44477b 100644 --- a/dlls/d2d1/d2d1_private.h +++ b/dlls/d2d1/d2d1_private.h @@ -574,6 +574,7 @@ struct d2d_effect_context LONG refcount;
ID2D1DeviceContext *device_context; + ID2D1Factory *factory; };
void d2d_effect_context_init(struct d2d_effect_context *effect_context, diff --git a/dlls/d2d1/effect.c b/dlls/d2d1/effect.c index ec12375cd9c..175248e3a42 100644 --- a/dlls/d2d1/effect.c +++ b/dlls/d2d1/effect.c @@ -72,6 +72,7 @@ static ULONG STDMETHODCALLTYPE d2d_effect_context_Release(ID2D1EffectContext *if
if (!refcount) { + ID2D1Factory_Release(effect_context->factory); ID2D1DeviceContext_Release(effect_context->device_context); heap_free(effect_context); } @@ -289,6 +290,7 @@ void d2d_effect_context_init(struct d2d_effect_context *effect_context, ID2D1Dev effect_context->ID2D1EffectContext_iface.lpVtbl = &d2d_effect_context_vtbl; effect_context->refcount = 1; ID2D1DeviceContext_AddRef(effect_context->device_context = device_context); + ID2D1DeviceContext_GetFactory(device_context, &effect_context->factory); }
static inline struct d2d_effect *impl_from_ID2D1Effect(ID2D1Effect *iface)