[balsa] mailbox-conf: do not dereference a NULL pointer



commit 44269088cf81f29f2313ef91a6d2613af3084bb7
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date:   Tue Dec 18 22:21:32 2018 -0500

    mailbox-conf: do not dereference a NULL pointer
    
    * src/mailbox-conf.c (create_local_mailbox_dialog): avoid
      possibly dereferencing a NULL pointer.

 ChangeLog          | 5 +++++
 src/mailbox-conf.c | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)
---
diff --git a/ChangeLog b/ChangeLog
index 0b8df6537..da0139b33 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2018-12-18  Peter Bloomfield  <pbloomfield bellsouth net>
+
+       * src/mailbox-conf.c (create_local_mailbox_dialog): avoid
+       possibly dereferencing a NULL pointer.
+
 2018-12-18  Albrecht Dreß  <albrecht dress arcor de>
 
        Fix broken display of expired application/pgp-keys parts
diff --git a/src/mailbox-conf.c b/src/mailbox-conf.c
index fc251d9e4..1831d3da6 100644
--- a/src/mailbox-conf.c
+++ b/src/mailbox-conf.c
@@ -729,7 +729,7 @@ create_local_mailbox_dialog(MailboxConfWindow *mcw)
 #endif
 
     gtk_file_chooser_set_extra_widget(GTK_FILE_CHOOSER(dialog), grid);
-    if (mcw->mailbox->url != NULL) {
+    if (mcw->mailbox != NULL && mcw->mailbox->url != NULL) {
                const gchar *path = libbalsa_mailbox_local_get_path(LIBBALSA_MAILBOX_LOCAL(mcw->mailbox));
                gchar *basename = g_path_get_basename(path);
 


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