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



commit fc5ce1b4cbacb397ec7216f38830c3b72ff64113
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 1659f3b..3579be7 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]