mirror of https://github.com/GNOME/gimp.git
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:
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>
|
||||
|
||||
* app/tools/gimpeditselectiontool.c (init_edit_selection):
|
||||
|
|
|
@ -468,7 +468,7 @@ gimp_container_deserialize (GObject *object,
|
|||
{
|
||||
GimpObject *child;
|
||||
GType type;
|
||||
gchar *name;
|
||||
gchar *name = NULL;
|
||||
|
||||
type = g_type_from_name (scanner->value.v_identifier);
|
||||
|
||||
|
@ -503,6 +503,9 @@ gimp_container_deserialize (GObject *object,
|
|||
break;
|
||||
}
|
||||
|
||||
if (! name)
|
||||
name = g_strdup ("");
|
||||
|
||||
child = gimp_container_get_child_by_name (container, name);
|
||||
|
||||
if (! child)
|
||||
|
@ -525,6 +528,8 @@ gimp_container_deserialize (GObject *object,
|
|||
g_object_unref (child);
|
||||
}
|
||||
|
||||
g_free (name);
|
||||
|
||||
{
|
||||
GimpConfigInterface *config_iface;
|
||||
|
||||
|
|
|
@ -1142,13 +1142,9 @@ gimp_context_serialize_property (GObject *object,
|
|||
gimp_config_writer_open (writer, pspec->name);
|
||||
|
||||
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
|
||||
{
|
||||
gimp_config_writer_print (writer, "NULL", 4);
|
||||
}
|
||||
gimp_config_writer_print (writer, "NULL", 4);
|
||||
|
||||
gimp_config_writer_close (writer);
|
||||
|
||||
|
@ -1226,6 +1222,9 @@ gimp_context_deserialize_property (GObject *object,
|
|||
{
|
||||
GimpObject *deserialize_obj;
|
||||
|
||||
if (! object_name)
|
||||
object_name = g_strdup ("");
|
||||
|
||||
deserialize_obj = gimp_container_get_child_by_name (container,
|
||||
object_name);
|
||||
|
||||
|
@ -1243,6 +1242,8 @@ gimp_context_deserialize_property (GObject *object,
|
|||
}
|
||||
|
||||
g_value_set_object (value, deserialize_obj);
|
||||
|
||||
g_free (object_name);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue