mirror of https://github.com/GNOME/gimp.git
file-cel: use statically allocated palette buffer
This commit is contained in:
parent
b772d1b84c
commit
69b98191cf
|
@ -558,7 +558,7 @@ load_image (const gchar *file,
|
|||
if (bpp != 32)
|
||||
{
|
||||
/* Use palette from file or otherwise default grey palette */
|
||||
palette = g_new (guchar, colours*3);
|
||||
guchar palette[256*3];
|
||||
|
||||
/* Open the file for reading if user picked one */
|
||||
if (palette_file == NULL)
|
||||
|
@ -595,10 +595,6 @@ load_image (const gchar *file,
|
|||
}
|
||||
|
||||
gimp_image_set_colormap (image, palette + 3, colours - 1);
|
||||
|
||||
/* Close palette file, give back allocated memory */
|
||||
|
||||
g_free (palette);
|
||||
}
|
||||
|
||||
/* Now get everything redrawn and hand back the finished image */
|
||||
|
|
Loading…
Reference in New Issue