pidgin: 980a83f1: Make sure uninitialized variable is not ...
sadrul at pidgin.im
sadrul at pidgin.im
Sat Jun 27 01:45:22 EDT 2009
-----------------------------------------------------------------
Revision: 980a83f19fd18616e5450d821532def57f971e89
Ancestor: 4e5a642f1af4cb2fa6cd49596c19d7f99312fc0b
Author: sadrul at pidgin.im
Date: 2009-06-27T05:45:43
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/980a83f19fd18616e5450d821532def57f971e89
Modified files:
pidgin/gtknotify.c
ChangeLog:
Make sure uninitialized variable is not used. This might fix #9345,
although I am not sure how. References #9345.
-------------- next part --------------
============================================================
--- pidgin/gtknotify.c 1696f5540d327085b88821d2508c368b74f60f67
+++ pidgin/gtknotify.c a7a5c07793176286bb3a43bb8368e4421b9442c2
@@ -557,7 +557,10 @@ pidgin_notify_add_mail(GtkTreeStore *tre
gtk_tree_store_remove(treemodel, &iter);
advanced = (iter.stamp == 0) ? FALSE : TRUE;
#endif
- purple_notify_close(PURPLE_NOTIFY_EMAILS, data);
+ if (data->purple_has_handle)
+ purple_notify_close(PURPLE_NOTIFY_EMAILS, data);
+ else
+ pidgin_close_notify(PURPLE_NOTIFY_EMAILS, data);
/* We're completely done if we've processed all entries */
if (!advanced)
return NULL;
@@ -612,7 +615,7 @@ pidgin_notify_emails(PurpleConnection *g
char *notification;
PurpleAccount *account;
PidginNotifyMailData *data = NULL, *data2;
- gboolean new_data;
+ gboolean new_data = FALSE;
/* Don't bother updating if there aren't new emails and we don't have any displayed currently */
if (count == 0 && mail_dialog == NULL)
@@ -660,7 +663,7 @@ pidgin_notify_emails(PurpleConnection *g
/* If we don't keep track of this, will leak "data" for each of the notifications except the last */
data2 = pidgin_notify_add_mail(mail_dialog->treemodel, account, notification, urls ? *urls : NULL, 0, FALSE, &new_data);
- if (new_data) {
+ if (data2 && new_data) {
if (data)
data->purple_has_handle = FALSE;
data = data2;
@@ -677,7 +680,7 @@ pidgin_notify_emails(PurpleConnection *g
(int)count),
*tos, (int)count);
data2 = pidgin_notify_add_mail(mail_dialog->treemodel, account, notification, urls ? *urls : NULL, count, FALSE, &new_data);
- if (new_data) {
+ if (data2 && new_data) {
if (data)
data->purple_has_handle = FALSE;
data = data2;
More information about the Commits
mailing list