changeset 15218:717935e035ca

[gaim-migrate @ 18007] If status.xml contained a substatus without an account for whatever reason, then we were registering a GaimSavedStatusSub with dbus, freeing it shortly therafter, but not unregistering it with dbus. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Fri, 15 Dec 2006 08:23:28 +0000
parents ae58cf5a441f
children ec96d6d2fa6d
files libgaim/savedstatuses.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libgaim/savedstatuses.c	Fri Dec 15 07:46:08 2006 +0000
+++ b/libgaim/savedstatuses.c	Fri Dec 15 08:23:28 2006 +0000
@@ -373,7 +373,6 @@
 	char *data;
 
 	ret = g_new0(GaimSavedStatusSub, 1);
-	GAIM_DBUS_REGISTER_POINTER(ret, GaimSavedStatusSub);
 
 	/* Read the account */
 	node = xmlnode_get_child(substatus, "account");
@@ -410,6 +409,7 @@
 		ret->message = data;
 	}
 
+	GAIM_DBUS_REGISTER_POINTER(ret, GaimSavedStatusSub);
 	return ret;
 }
 
@@ -447,7 +447,6 @@
 	int i;
 
 	ret = g_new0(GaimSavedStatus, 1);
-	GAIM_DBUS_REGISTER_POINTER(ret, GaimSavedStatus);
 
 	attrib = xmlnode_get_attrib(status, "transient");
 	if ((attrib == NULL) || (strcmp(attrib, "true")))
@@ -506,6 +505,7 @@
 			ret->substatuses = g_list_prepend(ret->substatuses, new);
 	}
 
+	GAIM_DBUS_REGISTER_POINTER(ret, GaimSavedStatus);
 	return ret;
 }