free the original cmap pointer, not the one we used for iteration (fixes
2003-03-31 Michael Natterer <mitch@gimp.org> * plug-ins/common/xpm.c (save_image): free the original cmap pointer, not the one we used for iteration (fixes bug #109567).
This commit is contained in:

committed by
Michael Natterer

parent
59af012a50
commit
ff2757dff8
@ -1,3 +1,8 @@
|
|||||||
|
2003-03-31 Michael Natterer <mitch@gimp.org>
|
||||||
|
|
||||||
|
* plug-ins/common/xpm.c (save_image): free the original cmap
|
||||||
|
pointer, not the one we used for iteration (fixes bug #109567).
|
||||||
|
|
||||||
2003-03-31 Michael Natterer <mitch@gimp.org>
|
2003-03-31 Michael Natterer <mitch@gimp.org>
|
||||||
|
|
||||||
* app/core/gimpdrawable-transform-utils.c
|
* app/core/gimpdrawable-transform-utils.c
|
||||||
|
@ -16,9 +16,11 @@
|
|||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* XPM plugin version 1.2.5 */
|
/* XPM plugin version 1.2.6 */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
1.2.6 fixes crash when saving indexed images (bug #109567)
|
||||||
|
|
||||||
1.2.5 only creates a "None" color entry if the image has alpha (bug #108034)
|
1.2.5 only creates a "None" color entry if the image has alpha (bug #108034)
|
||||||
|
|
||||||
1.2.4 displays an error message if saving fails (bug #87588)
|
1.2.4 displays an error message if saving fails (bug #87588)
|
||||||
@ -667,6 +669,9 @@ save_image (gchar *filename,
|
|||||||
if (indexed)
|
if (indexed)
|
||||||
{
|
{
|
||||||
guchar *cmap = gimp_image_get_cmap (image_ID, &ncolors);
|
guchar *cmap = gimp_image_get_cmap (image_ID, &ncolors);
|
||||||
|
guchar *c;
|
||||||
|
|
||||||
|
c = cmap;
|
||||||
|
|
||||||
if (alpha)
|
if (alpha)
|
||||||
ncolors++;
|
ncolors++;
|
||||||
@ -683,9 +688,9 @@ save_image (gchar *filename,
|
|||||||
gchar *string;
|
gchar *string;
|
||||||
guchar r, g, b;
|
guchar r, g, b;
|
||||||
|
|
||||||
r = *(cmap++);
|
r = *c++;
|
||||||
g = *(cmap++);
|
g = *c++;
|
||||||
b = *(cmap++);
|
b = *c++;
|
||||||
|
|
||||||
string = g_new (gchar, 8);
|
string = g_new (gchar, 8);
|
||||||
sprintf (string, "#%02X%02X%02X", (int)r, (int)g, (int)b);
|
sprintf (string, "#%02X%02X%02X", (int)r, (int)g, (int)b);
|
||||||
|
Reference in New Issue
Block a user