[balsa/wip/gtk4] mblist: In an idle handler, return immediately



commit ce5f9db9c66700823f4faeb4e0f0988b62b5028d
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date:   Tue Dec 10 11:35:53 2019 -0500

    mblist: In an idle handler, return immediately
    
    if the main window has been destroyed.

 src/balsa-mblist.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/src/balsa-mblist.c b/src/balsa-mblist.c
index a76d8e59a..d8f101f0f 100644
--- a/src/balsa-mblist.c
+++ b/src/balsa-mblist.c
@@ -909,6 +909,9 @@ G_LOCK_DEFINE_STATIC(mblist_update);
 static gboolean
 update_mailbox_idle(struct update_mbox_data *umd)
 {
+    if (balsa_app.main_window == NULL)
+        return G_SOURCE_REMOVE;
+
     G_LOCK(mblist_update);
 
     if (umd->mailbox) {
@@ -946,7 +949,7 @@ update_mailbox_idle(struct update_mbox_data *umd)
 
     G_UNLOCK(mblist_update);
 
-    return FALSE;
+    return G_SOURCE_REMOVE;
 }
 
 static void


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