[geary] Fix critical warning when changing conversations rapidly. Bug 714509.



commit f6518b056c0baafe52c92060c8340248ccea664b
Author: Michael James Gratton <mike vee net>
Date:   Tue Aug 2 13:46:25 2016 +1000

    Fix critical warning when changing conversations rapidly. Bug 714509.
    
    * src/client/conversation-viewer/conversation-viewer.vala
      (ConversationViewer::select_conversation_async): Ensure loading
      has not been cancelled after yielding to the list_full_messages_async
      call before attempting to add the messages.

 .../conversation-viewer/conversation-viewer.vala   |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/client/conversation-viewer/conversation-viewer.vala 
b/src/client/conversation-viewer/conversation-viewer.vala
index e819ed3..33a86fb 100644
--- a/src/client/conversation-viewer/conversation-viewer.vala
+++ b/src/client/conversation-viewer/conversation-viewer.vala
@@ -507,6 +507,10 @@ public class ConversationViewer : Gtk.Box {
         Gee.Collection<Geary.Email>? messages_to_add
             = yield list_full_messages_async(conversation.get_emails(
             Geary.App.Conversation.Ordering.SENT_DATE_ASCENDING), cancellable);
+
+        if (cancellable.is_cancelled()) {
+            return;
+        }
         
         // Add messages.
         if (messages_to_add != null) {


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