[geary] Fix a crash in ConversationEmail when loading is cancelled



commit 092a5a3cca0eaa45097693b34519cb7a5723afd1
Author: Michael Gratton <mike vee net>
Date:   Thu Feb 28 17:52:44 2019 +1100

    Fix a crash in ConversationEmail when loading is cancelled
    
    If the email had to be fected from the remote, but the load is cancelled
    between fetching it and loading the body, then the body load should not
    be attempted.

 src/client/conversation-viewer/conversation-email.vala | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/client/conversation-viewer/conversation-email.vala 
b/src/client/conversation-viewer/conversation-email.vala
index 3b461155..3a94b2f1 100644
--- a/src/client/conversation-viewer/conversation-email.vala
+++ b/src/client/conversation-viewer/conversation-email.vala
@@ -796,7 +796,7 @@ public class ConversationEmail : Gtk.Box, Geary.BaseInterface {
 
             this.body_loading_timeout.reset();
 
-            if (loaded != null) {
+            if (loaded != null && !this.load_cancellable.is_cancelled()) {
                 try {
                     this.email = loaded;
                     yield update_body();


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