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
Vincent Povirk 2020-05-14 20:51:10 -05:00 committed by Alexandre Julliard
parent ed2d0df4f7
commit 8b9cff6e70
1 changed files with 6 additions and 0 deletions

View File

@ -2285,6 +2285,12 @@ GpStatus WINGDIPAPI GdipGetImagePaletteSize(GpImage *image, INT *size)
if(!image || !size)
return InvalidParameter;
if (image->type == ImageTypeMetafile)
{
*size = 0;
return GenericError;
}
if (!image->palette || image->palette->Count == 0)
*size = sizeof(ColorPalette);
else