background: Fix memory leak in XML signal handling

When emitted in an idle, the item was correctly unref'ed, but not
when emitting the signal straight away.

https://bugzilla.gnome.org/show_bug.cgi?id=709243
This commit is contained in:
Bastien Nocera 2013-10-02 18:15:25 +02:00
parent a0ab6d527f
commit b9e3603ba4

View file

@ -316,6 +316,7 @@ cc_background_xml_load_xml_internal (CcBackgroundXml *xml,
emit_added_in_idle (xml, g_object_ref (item));
else
g_signal_emit (G_OBJECT (xml), signals[ADDED], 0, item);
g_object_unref (item);
retval = TRUE;
}
}