[evolution] Properly check if the current node is indeed the HR element before processing it



commit 04c4247bcec8a3d9892cf6ce0a6b0c8707622382
Author: Tomas Popela <tpopela redhat com>
Date:   Fri Aug 19 15:06:14 2016 +0200

    Properly check if the current node is indeed the HR element before processing it

 .../web-extension/e-editor-dom-functions.c         |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/modules/webkit-editor/web-extension/e-editor-dom-functions.c 
b/modules/webkit-editor/web-extension/e-editor-dom-functions.c
index a7950d3..2f6c218 100644
--- a/modules/webkit-editor/web-extension/e-editor-dom-functions.c
+++ b/modules/webkit-editor/web-extension/e-editor-dom-functions.c
@@ -9801,7 +9801,7 @@ return_pressed_after_h_rule (EEditorPage *editor_page)
                hr = webkit_dom_node_get_parent_node (WEBKIT_DOM_NODE (selection_marker));
                hr = webkit_dom_node_get_next_sibling (hr);
                node = webkit_dom_node_get_next_sibling (WEBKIT_DOM_NODE (selection_marker));
-               if (node && !WEBKIT_DOM_IS_HTML_BR_ELEMENT (node) &&
+               if (!node || !WEBKIT_DOM_IS_HTML_BR_ELEMENT (node) || !hr ||
                    !WEBKIT_DOM_IS_HTML_HR_ELEMENT (hr)) {
                        e_editor_dom_selection_restore (editor_page);
                        return FALSE;


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