app/crop.c app/sca_convert.c

Wed Oct 13 21:37:51 BST 1999 Andy Thomas <alt@gimp.org>

	* app/crop.c
	* app/sca_convert.c

	Fixes to memory problems (use of freed memory references) found
	by running with dmalloc.

	* app/paths_dialog.c

	Locking of multiple paths are now displayed correctly in the
	transform tool.
This commit is contained in:
BST 1999 Andy Thomas 1999-10-13 20:53:30 +00:00 committed by Andy Thomas
parent 70ce61f309
commit 08529ff5e7
8 changed files with 40 additions and 8 deletions

View File

@ -1,3 +1,16 @@
Wed Oct 13 21:37:51 BST 1999 Andy Thomas <alt@gimp.org>
* app/crop.c
* app/sca_convert.c
Fixes to memory problems (use of freed memory references) found
by running with dmalloc.
* app/paths_dialog.c
Locking of multiple paths are now displayed correctly in the
transform tool.
Mon Oct 11 02:45:06 BST 1999 Nick Lamb <njl195@zepler.org>
* plug-ins/common/psp.c: Saving is not implemented, so never add

View File

@ -94,6 +94,11 @@ convert_segment (ScanConverter *sc,
GSList **scanlines;
float xinc, xstart;
x1 = CLAMP(x1,0,(int)(sc->width * sc->antialias)-1);
y1 = CLAMP(y1,0,(int)(sc->height * sc->antialias)-1);
x2 = CLAMP(x2,0,(int)(sc->width * sc->antialias)-1);
y2 = CLAMP(y2,0,(int)(sc->height * sc->antialias)-1);
if (y1 > y2)
{
tmp = y2; y2 = y1; y1 = tmp;

View File

@ -774,11 +774,10 @@ tools_free_crop (Tool *tool)
if (tool->state == ACTIVE)
draw_core_stop (crop->core, tool);
draw_core_free (crop->core);
if (crop_info)
crop_close_callback (NULL, NULL);
draw_core_free (crop->core);
g_free (crop);
}

View File

@ -2664,6 +2664,7 @@ paths_draw_current(GDisplay * gdisp,
BezierSelect * bezier_sel;
PATHP p_copy;
GSList * points_list;
GSList * plist;
/* Get bzpath structure */
plp = (PATHIMAGELISTP)gimp_image_get_paths(gdisp->gimage);
@ -2671,8 +2672,11 @@ paths_draw_current(GDisplay * gdisp,
if(!plp)
return;
bzp = (PATHP)g_slist_nth_data(plp->bz_paths,plp->last_selected_row);
plist = plp->bz_paths;
while(plist)
{
bzp = (PATHP)plist->data;
/* This image path is locked */
if(bzp->locked)
{
@ -2705,6 +2709,8 @@ paths_draw_current(GDisplay * gdisp,
beziersel_free(bezier_sel);
path_free(p_copy,NULL);
}
plist = g_slist_next(plist);
}
}
/*************************************/

View File

@ -2664,6 +2664,7 @@ paths_draw_current(GDisplay * gdisp,
BezierSelect * bezier_sel;
PATHP p_copy;
GSList * points_list;
GSList * plist;
/* Get bzpath structure */
plp = (PATHIMAGELISTP)gimp_image_get_paths(gdisp->gimage);
@ -2671,8 +2672,11 @@ paths_draw_current(GDisplay * gdisp,
if(!plp)
return;
bzp = (PATHP)g_slist_nth_data(plp->bz_paths,plp->last_selected_row);
plist = plp->bz_paths;
while(plist)
{
bzp = (PATHP)plist->data;
/* This image path is locked */
if(bzp->locked)
{
@ -2705,6 +2709,8 @@ paths_draw_current(GDisplay * gdisp,
beziersel_free(bezier_sel);
path_free(p_copy,NULL);
}
plist = g_slist_next(plist);
}
}
/*************************************/

View File

@ -94,6 +94,11 @@ convert_segment (ScanConverter *sc,
GSList **scanlines;
float xinc, xstart;
x1 = CLAMP(x1,0,(int)(sc->width * sc->antialias)-1);
y1 = CLAMP(y1,0,(int)(sc->height * sc->antialias)-1);
x2 = CLAMP(x2,0,(int)(sc->width * sc->antialias)-1);
y2 = CLAMP(y2,0,(int)(sc->height * sc->antialias)-1);
if (y1 > y2)
{
tmp = y2; y2 = y1; y1 = tmp;

View File

@ -774,11 +774,10 @@ tools_free_crop (Tool *tool)
if (tool->state == ACTIVE)
draw_core_stop (crop->core, tool);
draw_core_free (crop->core);
if (crop_info)
crop_close_callback (NULL, NULL);
draw_core_free (crop->core);
g_free (crop);
}

View File

@ -774,11 +774,10 @@ tools_free_crop (Tool *tool)
if (tool->state == ACTIVE)
draw_core_stop (crop->core, tool);
draw_core_free (crop->core);
if (crop_info)
crop_close_callback (NULL, NULL);
draw_core_free (crop->core);
g_free (crop);
}