[evolution/wip/webkit2] EHTMLEditorView - Don't check for links if we cannot obtain valid block



commit a17b5ac4a19d4c7f422a2b8de63aaeef3aadb4c6
Author: Tomas Popela <tpopela redhat com>
Date:   Thu Mar 3 12:50:12 2016 +0100

    EHTMLEditorView - Don't check for links if we cannot obtain valid block

 .../composer/e-html-editor-view-dom-functions.c    |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/web-extensions/composer/e-html-editor-view-dom-functions.c 
b/web-extensions/composer/e-html-editor-view-dom-functions.c
index 9d5d45c..0c7195e 100644
--- a/web-extensions/composer/e-html-editor-view-dom-functions.c
+++ b/web-extensions/composer/e-html-editor-view-dom-functions.c
@@ -924,7 +924,9 @@ dom_check_magic_links (WebKitDOMDocument *document,
 
                block = get_parent_block_node_from_child (node);
                /* Get previous block */
-               block = webkit_dom_node_get_previous_sibling (block);
+               if (!(block = webkit_dom_node_get_previous_sibling (block)))
+                       return;
+
                /* If block is quoted content, get the last block there */
                while (block && WEBKIT_DOM_IS_HTML_QUOTE_ELEMENT (block))
                        block = webkit_dom_node_get_last_child (block);


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