forked from Mirrors/wine-wine
gdiplus: Return an error retrieving the palette for a metafile.
Signed-off-by: Vincent Povirk <vincent@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>feature/deterministic
parent
ed2d0df4f7
commit
8b9cff6e70
|
@ -2285,6 +2285,12 @@ GpStatus WINGDIPAPI GdipGetImagePaletteSize(GpImage *image, INT *size)
|
||||||
if(!image || !size)
|
if(!image || !size)
|
||||||
return InvalidParameter;
|
return InvalidParameter;
|
||||||
|
|
||||||
|
if (image->type == ImageTypeMetafile)
|
||||||
|
{
|
||||||
|
*size = 0;
|
||||||
|
return GenericError;
|
||||||
|
}
|
||||||
|
|
||||||
if (!image->palette || image->palette->Count == 0)
|
if (!image->palette || image->palette->Count == 0)
|
||||||
*size = sizeof(ColorPalette);
|
*size = sizeof(ColorPalette);
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue