[geary] Workaround for random crash when usign WebKitGTK+ 2.4.10. Fixes Bug 763933.



commit 46c4a4b4f690572f90b453bb1684ae30a2fc0b6c
Author: Michael James Gratton <mike vee net>
Date:   Mon Mar 21 11:19:23 2016 +1100

    Workaround for random crash when usign WebKitGTK+ 2.4.10. Fixes Bug 763933.
    
    * src/client/conversation-viewer/conversation-viewer.vala
      (ConversationViewer::show_images_email): Crash happens when setting
      value for an existing SRC attr on existing IMG element, so remove it
      before setting it.
    
    Signed-off-by: Michael James Gratton <mike vee net>

 .../conversation-viewer/conversation-viewer.vala   |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/src/client/conversation-viewer/conversation-viewer.vala 
b/src/client/conversation-viewer/conversation-viewer.vala
index 4206857..eb85465 100644
--- a/src/client/conversation-viewer/conversation-viewer.vala
+++ b/src/client/conversation-viewer/conversation-viewer.vala
@@ -1493,8 +1493,11 @@ public class ConversationViewer : Gtk.Box {
                         continue;
                     
                     string src = element.get_attribute("src");
-                    if (!web_view.is_always_loaded(src))
+                    if (!web_view.is_always_loaded(src)) {
+                        // Workaround a WebKitGTK+ 2.4.10 crash. See Bug 763933
+                        element.remove_attribute("src");
                         element.set_attribute("src", web_view.allow_prefix + src);
+                    }
                 }
             }
             


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