[geary] Work around crash when replying to a long email. Bug 773132.



commit d6ad54bac289b5ba12a6a6d5dcc31ff3962d4c6e
Author: Michael James Gratton <mike vee net>
Date:   Sat Oct 22 10:35:17 2016 +1100

    Work around crash when replying to a long email. Bug 773132.

 src/client/composer/composer-embed.vala |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/src/client/composer/composer-embed.vala b/src/client/composer/composer-embed.vala
index ec89b2a..64b60c1 100644
--- a/src/client/composer/composer-embed.vala
+++ b/src/client/composer/composer-embed.vala
@@ -204,6 +204,16 @@ public class ComposerEmbed : Gtk.EventBox, ComposerContainer {
 
             // Calculate height widget should be to avoid scrolling in editor
             int widget_height = int.max(view_height + base_height - 2, min_height); //? about 2
+
+            // XXX Clamp the widget height to something arbitrary for
+            // the same reasons as in
+            // ConversationWebView::get_preferred_height, to avoid a
+            // crash. See Bug 765516 and Bug 728002.
+            const int MAX_HEIGHT = 5000;
+            if (widget_height > MAX_HEIGHT) {
+                widget_height = MAX_HEIGHT;
+            }
+
             set_size_request(-1, widget_height);
         }
         return Source.REMOVE;


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