Commit 69b98191 authored by Nils Philippsen's avatar Nils Philippsen
Browse files

file-cel: use statically allocated palette buffer

parent b772d1b8
......@@ -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 */
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment