d3drm: Suppress a use-after-free warning in d3drm_image_palettise (GCC).
This commit is contained in:
parent
9a80befba3
commit
abbf0524a4
1 changed files with 2 additions and 1 deletions
|
@ -153,7 +153,8 @@ static BOOL d3drm_image_palettise(D3DRMIMAGE *image, unsigned char *src_data,
|
|||
image->green_mask = 0xff;
|
||||
image->blue_mask = 0xff;
|
||||
image->palette_size = colour_count;
|
||||
if (!(image->palette = realloc(palette, colour_count * sizeof(*palette))))
|
||||
image->palette = palette;
|
||||
if ((palette = realloc(palette, colour_count * sizeof(*palette))))
|
||||
image->palette = palette;
|
||||
|
||||
return TRUE;
|
||||
|
|
Loading…
Add table
Reference in a new issue