changeset 10580:662a99c6701f

[gaim-migrate @ 11978] sf patch #1112736, from Felipe Contreras Fix a thing where we might free a GaimPresence when it is still in use committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Mon, 07 Feb 2005 23:29:48 +0000
parents 71478e6a6074
children 59a2807e10bb
files src/status.c
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/status.c	Sun Feb 06 17:40:45 2005 +0000
+++ b/src/status.c	Mon Feb 07 23:29:48 2005 +0000
@@ -1169,8 +1169,6 @@
 	{
 		GaimStatusBuddyKey key;
 
-		presence->u.buddy.ref_count--;
-
 		if(presence->u.buddy.ref_count != 0)
 			return;
 
@@ -1196,6 +1194,11 @@
 	g_free(presence);
 }
 
+/*
+ * TODO: Maybe we should cal gaim_presence_destroy() after we
+ *       decrement the ref count?  I don't see why we should
+ *       make other places do it manually when we can do it here.
+ */
 void
 gaim_presence_remove_buddy(GaimPresence *presence, GaimBuddy *buddy)
 {