d2d1: Release bitmap on d2d_device_context_SetTarget() error path.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
32799848e3
commit
d0902b7c8e
|
@ -2051,6 +2051,7 @@ static void STDMETHODCALLTYPE d2d_device_context_SetTarget(ID2D1DeviceContext *i
|
|||
|
||||
if (!(bitmap_impl->options & D2D1_BITMAP_OPTIONS_TARGET))
|
||||
{
|
||||
ID2D1Bitmap_Release(bitmap);
|
||||
d2d_device_context_set_error(context, D2DERR_INVALID_TARGET);
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue