Better place to remove the draft callback, where we hold the mutex
authorColin Leroy <colin@colino.net>
Fri, 23 May 2014 09:37:26 +0000 (11:37 +0200)
committerColin Leroy <colin@colino.net>
Fri, 23 May 2014 09:37:26 +0000 (11:37 +0200)
src/compose.c

index 9a2531a..11d8e1d 100644 (file)
@@ -8691,11 +8691,6 @@ static void compose_destroy(Compose *compose)
                return;
        }
 
-       if (compose->draft_timeout_tag >= 0) { /* CLAWS: disable draft timeout */
-               g_source_remove(compose->draft_timeout_tag);
-               compose->draft_timeout_tag = COMPOSE_DRAFT_TIMEOUT_UNSET;
-       }
-
        /* NOTE: address_completion_end() does nothing with the window
         * however this may change. */
        address_completion_end(compose->window);
@@ -11577,6 +11572,11 @@ gboolean compose_close(Compose *compose)
                return FALSE;
        }
 
+       if (compose->draft_timeout_tag >= 0) {
+               g_source_remove(compose->draft_timeout_tag);
+               compose->draft_timeout_tag = COMPOSE_DRAFT_TIMEOUT_UNSET;
+       }
+
        gtkut_widget_get_uposition(compose->window, &x, &y);
        if (!compose->batch) {
                prefs_common.compose_x = x;