pidgin: 4e7c24fc: Avoiding emitting the "savedstatus-chang...

datallah at pidgin.im datallah at pidgin.im
Fri Apr 25 13:56:08 EDT 2008


-----------------------------------------------------------------
Revision: 4e7c24fc3c65a5d148b580e3b8f90ac69f6f01e4
Ancestor: 4f44b915ab4b757df743c26147c1a5242ed033ec
Author: datallah at pidgin.im
Date: 2008-04-25T15:37:21
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/4e7c24fc3c65a5d148b580e3b8f90ac69f6f01e4

Modified files:
        libpurple/savedstatuses.c

ChangeLog: 

Avoiding emitting the "savedstatus-changed" signal twice when the savedstatus
is set to idleaway. Also, NULL freed memory so that if plugins try to do stuff
they shouldn't do, we don't access it.

-------------- next part --------------
============================================================
--- libpurple/savedstatuses.c	065fd351605b5daaaa3021bfca8e2f64fd729ffa
+++ libpurple/savedstatuses.c	5f842ca17975257f3af208f4125d43cb00d34d52
@@ -1128,10 +1128,12 @@ purple_savedstatus_activate(PurpleSavedS
 
 	g_list_free(accounts);
 
-	purple_savedstatus_set_idleaway(FALSE);
-
-	purple_signal_emit(purple_savedstatuses_get_handle(), "savedstatus-changed",
-					 saved_status, old);
+	if (purple_savedstatus_is_idleaway()) {
+		purple_savedstatus_set_idleaway(FALSE);
+	} else {
+		purple_signal_emit(purple_savedstatuses_get_handle(), "savedstatus-changed",
+					 	   saved_status, old);
+	}
 }
 
 void
@@ -1250,6 +1252,7 @@ purple_savedstatuses_uninit(void)
 	}
 
 	g_hash_table_destroy(creation_times);
+	creation_times = NULL;
 
 	purple_signals_unregister_by_instance(purple_savedstatuses_get_handle());
 }


More information about the Commits mailing list