[balsa] libbalsa/message: Do not trigger CRITICAL message



commit accd4aa6aa4fc6a0b46be26af9e54e7387034e22
Author: Albrecht Dreß <albrecht dress arcor de>
Date:   Sun Jan 20 19:57:27 2019 -0500

    libbalsa/message: Do not trigger CRITICAL message
    
    Do not trigger a CRITICAL message when request for a Message
    Disposition Notification is activated
    Fixes https://mail.gnome.org/archives/balsa-list/2019-January/msg00018.html
    
    * libbalsa/message.c (libbalsa_message_set_dispnotify): test
      whether message->headers->dispnotify_to is NULL before unreffing it.
    
    Signed-off-by: Peter Bloomfield <PeterBloomfield bellsouth net>

 ChangeLog          | 11 +++++++++++
 libbalsa/message.c |  4 +++-
 2 files changed, 14 insertions(+), 1 deletion(-)
---
diff --git a/ChangeLog b/ChangeLog
index f32024bc4..7e1e13854 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2018-01-20  Albrecht Dreß  <albrecht dress arcor de>
+
+       Do not trigger a CRITICAL message when request for a Message
+       Disposition Notification is activated
+       Fixes
+       https://mail.gnome.org/archives/balsa-list/2019-January/msg00018.html
+
+       * libbalsa/message.c (libbalsa_message_set_dispnotify): test
+       whether message->headers->dispnotify_to is NULL before unreffing
+       it.
+
 2018-01-13  Albrecht Dreß  <albrecht dress arcor de>
 
        Get the Autocrypt headers from Balsa's user-headers instead of
diff --git a/libbalsa/message.c b/libbalsa/message.c
index d9ad40d50..ce1cbba68 100644
--- a/libbalsa/message.c
+++ b/libbalsa/message.c
@@ -820,7 +820,9 @@ libbalsa_message_set_dispnotify(LibBalsaMessage * message,
 {
     g_return_if_fail(message);
 
-    g_object_unref(message->headers->dispnotify_to);
+    if (message->headers->dispnotify_to != NULL) {
+       g_object_unref(message->headers->dispnotify_to);
+    }
     if (ia) {
        message->headers->dispnotify_to = internet_address_list_new ();
        internet_address_list_add (message->headers->dispnotify_to, ia);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]