Remove draft_timeout_tag too before destroying
authorColin Leroy <colin@colino.net>
Fri, 23 May 2014 09:29:16 +0000 (11:29 +0200)
committerColin Leroy <colin@colino.net>
Fri, 23 May 2014 09:29:16 +0000 (11:29 +0200)
src/compose.c

index 68f29a1..9a2531a 100644 (file)
@@ -8690,6 +8690,12 @@ static void compose_destroy(Compose *compose)
                compose->deferred_destroy = TRUE;
                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);