app/edit_cmds.c fix warnings about using uninitialized gimage args + one

Mon Nov 16 21:46:39 1998  Austin Donnelly  <austin@greenend.org.uk>

	* app/edit_cmds.c
	* app/gimage_mask_cmds.c: fix warnings about using uninitialized
	gimage args + one real uninited variable bug.
This commit is contained in:
Austin Donnelly 1998-11-16 22:10:35 +00:00 committed by Austin Donnelly
parent 44b1e35036
commit a6026d29cd
3 changed files with 74 additions and 24 deletions

View File

@ -1,3 +1,9 @@
Mon Nov 16 21:46:39 1998 Austin Donnelly <austin@greenend.org.uk>
* app/edit_cmds.c
* app/gimage_mask_cmds.c: fix warnings about using uninitialized
gimage args + one real uninited variable bug.
Mon Nov 16 19:04:54 MET 1998 Sven Neumann <sven@gimp.org>
* app/gimage_cmds.[ch]

View File

@ -52,10 +52,15 @@ edit_cut_invoker (Argument *args)
int_value = args[0].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL)
{
success = FALSE;
gimage = NULL;
}
else
{
gimage = drawable_gimage (drawable);
}
}
/* create the new image */
if (success)
success = (edit_cut (gimage, drawable) != NULL);
@ -113,10 +118,15 @@ edit_copy_invoker (Argument *args)
int_value = args[0].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL)
{
success = FALSE;
gimage = NULL;
}
else
{
gimage = drawable_gimage (drawable);
}
}
/* create the new image */
if (success)
@ -177,10 +187,15 @@ edit_paste_invoker (Argument *args)
int_value = args[0].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL)
{
success = FALSE;
gimage = NULL;
}
else
{
gimage = drawable_gimage (drawable);
}
}
if (success)
{
int_value = args[1].value.pdb_int;
@ -261,10 +276,15 @@ edit_clear_invoker (Argument *args)
int_value = args[0].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL)
{
success = FALSE;
gimage = NULL;
}
else
{
gimage = drawable_gimage (drawable);
}
}
/* create the new image */
if (success)
@ -322,10 +342,15 @@ edit_fill_invoker (Argument *args)
int_value = args[0].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL)
{
success = FALSE;
gimage = NULL;
}
else
{
gimage = drawable_gimage (drawable);
}
}
/* create the new image */
if (success)
@ -384,10 +409,15 @@ edit_stroke_invoker (Argument *args)
int_value = args[0].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL)
{
success = FALSE;
gimage = NULL;
}
else
{
gimage = drawable_gimage (drawable);
}
}
/* create the new image */
if (success)

View File

@ -359,11 +359,17 @@ gimage_mask_float_invoker (Argument *args)
if (success)
{
int_value = args[0].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL)
{
success = FALSE;
gimage = NULL;
}
else
{
gimage = drawable_gimage (drawable);
}
}
if (success)
{
offx = args[1].value.pdb_int;
@ -969,10 +975,15 @@ gimage_mask_layer_alpha_invoker (Argument *args)
{
int_value = args[0].value.pdb_int;
if ((layer = layer_get_ID (int_value)) == NULL)
{
success = FALSE;
gimage = NULL;
}
else
{
gimage = drawable_gimage (GIMP_DRAWABLE(layer));
}
}
if (success)
gimage_mask_layer_alpha (gimage, layer);
@ -1025,7 +1036,10 @@ gimage_mask_load_invoker (Argument *args)
{
int_value = args[0].value.pdb_int;
if ((channel = channel_get_ID (int_value)) == NULL)
{
success = FALSE;
gimage = NULL;
}
else
{
success = (drawable_width (GIMP_DRAWABLE(channel)) == gimage->width &&