@@ -2220,10 +2157,8 @@ GpStatus WINGDIPAPI GdipGetImageBounds(GpImage *image, GpRectF *srcRect, *srcUnit = UnitPixel; } else{
srcRect->X = srcRect->Y = 0.0;
srcRect->Width = ipicture_pixel_width(image->picture);
srcRect->Height = ipicture_pixel_height(image->picture);
*srcUnit = UnitPixel;
WARN("GpImage with no image data (metafile in wrong state?)\n");
return InvalidParameter;
}
TRACE("returning (%f, %f) (%f, %f) unit type %d\n", srcRect->X, srcRect->Y,
The "metafile in wrong state?" part is wrong, because that would still have ImageTypeMetafile, and we'd have bounds to return. If this case ever occurs, it's more likely a use-after-free (we set the type to ~0 when we free images), or a random pointer that doesn't point to a GpImage.