app/core/gimpcontext.c (gimp_context_deserialize_property) g_free() the
2003-04-13 Michael Natterer <mitch@gimp.org> * app/core/gimpcontext.c (gimp_context_deserialize_property) * app/core/gimpcontainer.c (gimp_container_deserialize): g_free() the string returned by gimp_scanner_parse_string(). Replace NULL object names by "".
This commit is contained in:

committed by
Michael Natterer

parent
4799083c69
commit
ffa291d6ce
@ -1,3 +1,10 @@
|
|||||||
|
2003-04-13 Michael Natterer <mitch@gimp.org>
|
||||||
|
|
||||||
|
* app/core/gimpcontext.c (gimp_context_deserialize_property)
|
||||||
|
* app/core/gimpcontainer.c (gimp_container_deserialize): g_free()
|
||||||
|
the string returned by gimp_scanner_parse_string(). Replace
|
||||||
|
NULL object names by "".
|
||||||
|
|
||||||
2003-04-13 Michael Natterer <mitch@gimp.org>
|
2003-04-13 Michael Natterer <mitch@gimp.org>
|
||||||
|
|
||||||
* app/tools/gimpeditselectiontool.c (init_edit_selection):
|
* app/tools/gimpeditselectiontool.c (init_edit_selection):
|
||||||
|
@ -468,7 +468,7 @@ gimp_container_deserialize (GObject *object,
|
|||||||
{
|
{
|
||||||
GimpObject *child;
|
GimpObject *child;
|
||||||
GType type;
|
GType type;
|
||||||
gchar *name;
|
gchar *name = NULL;
|
||||||
|
|
||||||
type = g_type_from_name (scanner->value.v_identifier);
|
type = g_type_from_name (scanner->value.v_identifier);
|
||||||
|
|
||||||
@ -503,6 +503,9 @@ gimp_container_deserialize (GObject *object,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (! name)
|
||||||
|
name = g_strdup ("");
|
||||||
|
|
||||||
child = gimp_container_get_child_by_name (container, name);
|
child = gimp_container_get_child_by_name (container, name);
|
||||||
|
|
||||||
if (! child)
|
if (! child)
|
||||||
@ -525,6 +528,8 @@ gimp_container_deserialize (GObject *object,
|
|||||||
g_object_unref (child);
|
g_object_unref (child);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
g_free (name);
|
||||||
|
|
||||||
{
|
{
|
||||||
GimpConfigInterface *config_iface;
|
GimpConfigInterface *config_iface;
|
||||||
|
|
||||||
|
@ -1142,13 +1142,9 @@ gimp_context_serialize_property (GObject *object,
|
|||||||
gimp_config_writer_open (writer, pspec->name);
|
gimp_config_writer_open (writer, pspec->name);
|
||||||
|
|
||||||
if (serialize_obj)
|
if (serialize_obj)
|
||||||
{
|
|
||||||
gimp_config_writer_string (writer, gimp_object_get_name (serialize_obj));
|
gimp_config_writer_string (writer, gimp_object_get_name (serialize_obj));
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
|
||||||
gimp_config_writer_print (writer, "NULL", 4);
|
gimp_config_writer_print (writer, "NULL", 4);
|
||||||
}
|
|
||||||
|
|
||||||
gimp_config_writer_close (writer);
|
gimp_config_writer_close (writer);
|
||||||
|
|
||||||
@ -1226,6 +1222,9 @@ gimp_context_deserialize_property (GObject *object,
|
|||||||
{
|
{
|
||||||
GimpObject *deserialize_obj;
|
GimpObject *deserialize_obj;
|
||||||
|
|
||||||
|
if (! object_name)
|
||||||
|
object_name = g_strdup ("");
|
||||||
|
|
||||||
deserialize_obj = gimp_container_get_child_by_name (container,
|
deserialize_obj = gimp_container_get_child_by_name (container,
|
||||||
object_name);
|
object_name);
|
||||||
|
|
||||||
@ -1243,6 +1242,8 @@ gimp_context_deserialize_property (GObject *object,
|
|||||||
}
|
}
|
||||||
|
|
||||||
g_value_set_object (value, deserialize_obj);
|
g_value_set_object (value, deserialize_obj);
|
||||||
|
|
||||||
|
g_free (object_name);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user