Commit 120c64df authored by Manish Singh's avatar Manish Singh

added an assert for name != NULL

* app/gimpdrawable.c: added an assert for name != NULL

* tools/pdbgen/pdb/channel.pdb
* tools/pdbgen/pdb/layer.pdb: sanity check the name parameters

-Yosh
parent 84a8b6fe
Mon Dec 20 16:32:39 PST 1999 Manish Singh <yosh@gimp.org>
* app/gimpdrawable.c: added an assert for name != NULL
* tools/pdbgen/pdb/channel.pdb
* tools/pdbgen/pdb/layer.pdb: sanity check the name parameters
Mon Dec 20 18:42:51 EST 1999 Gregory McLean <gregm@comstar.net>
* gimp.spec: Slightly more upto date spec file. Work in progress.
......
......@@ -330,6 +330,8 @@ channel_set_name_invoker (Argument *args)
success = FALSE;
name = (gchar *) args[1].value.pdb_pointer;
if (name == NULL)
success = FALSE;
if (success)
channel_set_name (channel, name);
......
......@@ -323,6 +323,7 @@ gimp_drawable_set_name (GimpDrawable *drawable,
gchar numberbuf[20];
g_return_if_fail (GIMP_IS_DRAWABLE (drawable));
g_return_if_fail (name != NULL);
if (drawable->name)
{
......
......@@ -323,6 +323,7 @@ gimp_drawable_set_name (GimpDrawable *drawable,
gchar numberbuf[20];
g_return_if_fail (GIMP_IS_DRAWABLE (drawable));
g_return_if_fail (name != NULL);
if (drawable->name)
{
......
......@@ -963,6 +963,8 @@ layer_set_name_invoker (Argument *args)
success = FALSE;
name = (gchar *) args[1].value.pdb_pointer;
if (name == NULL)
success = FALSE;
if (success)
layer_set_name (layer, name);
......
......@@ -187,8 +187,7 @@ HELP
%invoke = ( code => 'channel_delete (channel);' );
}
&channel_accessors('name', 'string', 'name', 1,
[ undef, '$inargs[1]->{no_success} = 1' ]);
&channel_accessors('name', 'string', 'name', 1);
&channel_accessors('visible', 'boolean', 'visibility', 0,
[ '$outargs[0]->{alias} =~
......
......@@ -460,8 +460,7 @@ HELP
);
}
&layer_accessors('name', 'string', 'name', 1, 0,
[ undef, '$inargs[1]->{no_success} = 1' ]);
&layer_accessors('name', 'string', 'name', 1, 0);
&layer_accessors('visible', 'boolean', 'visibility', 0, 0,
[ '$outargs[0]->{alias} =~ s/(layer)/GIMP_DRAWABLE ($1)/',
......
Markdown is supported
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