Fix crash on double notification popup.
authorAndrej Kacian <ticho@claws-mail.org>
Mon, 17 Aug 2015 18:45:38 +0000 (20:45 +0200)
committerAndrej Kacian <ticho@claws-mail.org>
Mon, 17 Aug 2015 18:45:38 +0000 (20:45 +0200)
Patch by Richard Hughes. Closes bug #3496.

AUTHORS
src/gtk/authors.h
src/plugins/notification/notification_popup.c

diff --git a/AUTHORS b/AUTHORS
index 4bc665a..5accdbd 100644 (file)
--- a/AUTHORS
+++ b/AUTHORS
@@ -307,3 +307,4 @@ contributors (in addition to the above; based on Changelog)
        Robert David
        Oliver Schneider
        Jean Diraison
+       Richard Hughes
index 9880919..70209db 100644 (file)
@@ -161,6 +161,7 @@ static char *CONTRIBS_LIST[] = {
 "Michihide Hotta",
 "Shawn Houston",
 "Michael Hughes",
+"Richard Hughes",
 "Chideok Hwang",
 "John E.P. Hynes",
 "Hironori IWANE",
index 7393af2..180f067 100644 (file)
@@ -566,8 +566,10 @@ static gboolean notification_popup_add_msg(MsgInfo *msginfo)
     ppopup->msg_path = NULL;
   }
 
-  if(ppopup->label2)
+  if(ppopup->label2) {
     gtk_widget_destroy(ppopup->label2);
+               ppopup->label2 = NULL;
+       }
 
   message = g_strdup_printf(ngettext("%d new message",
                                     "%d new messages",