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..eb2f71f7c03 100644 --- a/dlls/d2d1/d2d1_private.h +++ b/dlls/d2d1/d2d1_private.h @@ -573,6 +573,7 @@ struct d2d_effect_context ID2D1EffectContext ID2D1EffectContext_iface; LONG refcount;
+ ID2D1Factory *factory; ID2D1DeviceContext *device_context; };
diff --git a/dlls/d2d1/effect.c b/dlls/d2d1/effect.c index ec12375cd9c..bfb2e9d16d9 100644 --- a/dlls/d2d1/effect.c +++ b/dlls/d2d1/effect.c @@ -73,6 +73,7 @@ static ULONG STDMETHODCALLTYPE d2d_effect_context_Release(ID2D1EffectContext *if if (!refcount) { ID2D1DeviceContext_Release(effect_context->device_context); + ID2D1Factory_Release(effect_context->factory); heap_free(effect_context); }
@@ -288,6 +289,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_GetFactory(device_context, &effect_context->factory); ID2D1DeviceContext_AddRef(effect_context->device_context = device_context); }