[evolution/wip/webkit-composer: 292/372] Check if next sibling is WEBKIT_DOM_CHARACTER_DATA when processing Delete key while wrapping.



commit ed44bfee2674bd94b80e976430365601427ea4aa
Author: Tomas Popela <tpopela redhat com>
Date:   Wed Jul 24 17:33:44 2013 +0200

    Check if next sibling is WEBKIT_DOM_CHARACTER_DATA when processing Delete key while wrapping.

 e-util/e-editor-selection.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/e-util/e-editor-selection.c b/e-util/e-editor-selection.c
index 2776dc6..ae0af9a 100644
--- a/e-util/e-editor-selection.c
+++ b/e-util/e-editor-selection.c
@@ -2908,8 +2908,9 @@ wrap_lines (EEditorSelection *selection,
                                 * delete the first character of the line that is below us */
                                if (delete_pressed && (paragraph_char_count / (br_count + 1)) > 
word_wrap_length) {
                                        WebKitDOMNode *next_text = webkit_dom_node_get_next_sibling (node);
-                                       webkit_dom_character_data_delete_data (
-                                               WEBKIT_DOM_CHARACTER_DATA (next_text), 0, 1, NULL);
+                                       if (WEBKIT_DOM_IS_CHARACTER_DATA (next_text))
+                                               webkit_dom_character_data_delete_data (
+                                                       WEBKIT_DOM_CHARACTER_DATA (next_text), 0, 1, NULL);
                                }
                                continue;
                        }


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