[evolution] Bug 758015 - Composer lockup



commit c47023f36b5c4eddcd220b03082676b36b2ad67d
Author: Tomas Popela <tpopela redhat com>
Date:   Fri Nov 13 12:57:48 2015 +0100

    Bug 758015 - Composer lockup
    
    The backtrace from the bug showed that we were trying to append a new child into
    the parent that did not exist.

 e-util/e-html-editor-view.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/e-util/e-html-editor-view.c b/e-util/e-html-editor-view.c
index 28fc5a1..ddfa241 100644
--- a/e-util/e-html-editor-view.c
+++ b/e-util/e-html-editor-view.c
@@ -5646,9 +5646,14 @@ key_press_event_process_delete_or_backspace_key (EHTMLEditorView *view,
                }
 
                last_child = webkit_dom_node_get_last_child (prev_block);
-               while (WEBKIT_DOM_IS_HTML_QUOTE_ELEMENT (last_child))
+               while (last_child && WEBKIT_DOM_IS_HTML_QUOTE_ELEMENT (last_child))
                        last_child = webkit_dom_node_get_last_child (last_child);
 
+               if (!last_child) {
+                       e_html_editor_selection_restore (selection);
+                       return FALSE;
+               }
+
                remove_wrapping_from_element (WEBKIT_DOM_ELEMENT (last_child));
                remove_quoting_from_element (WEBKIT_DOM_ELEMENT (last_child));
 


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