Nikolay Sivov nsivov@codeweavers.com wrote:
+static void STDMETHODCALLTYPE d2d_image_brush_SetImage(ID2D1ImageBrush *iface, ID2D1Image *image) +{
- struct d2d_brush *brush = impl_from_ID2D1ImageBrush(iface);
- TRACE("iface %p, image %p.\n", iface, image);
- if (brush->u.image.image)
ID2D1Image_Release(brush->u.image.image);
- brush->u.image.image = image;
+}
This one is probably missing an AddRef. Is it possible to have null images here? If not, it could be unconditional here, and on release.
This implementation is based on the ::SetBitmap(), and it looks like I really missed the AddRef, thanks for spotting that, much appreciated.