From 04b05bf605cdad727ad17ed632a37a6635c79f19 Mon Sep 17 00:00:00 2001 From: Tomas Popela Date: Fri, 5 Sep 2014 13:34:15 +0200 Subject: EHTMLEditorSelection - Avoid the runtime warning when the caret was saved outside of the body This could happen during the HTML -> plain text conversion. --- e-util/e-html-editor-selection.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/e-util/e-html-editor-selection.c b/e-util/e-html-editor-selection.c index 84f6fbc41c..d2b4121900 100644 --- a/e-util/e-html-editor-selection.c +++ b/e-util/e-html-editor-selection.c @@ -2612,7 +2612,8 @@ get_parent_indented_block (WebKitDOMNode *node) if (element_has_class (WEBKIT_DOM_ELEMENT (parent), "-x-evo-indented")) block = parent; - while (parent && !WEBKIT_DOM_IS_HTML_BODY_ELEMENT (parent)) { + while (parent && !WEBKIT_DOM_IS_HTML_BODY_ELEMENT (parent) && + !WEBKIT_DOM_IS_HTML_HTML_ELEMENT (parent)) { if (element_has_class (WEBKIT_DOM_ELEMENT (parent), "-x-evo-indented")) block = parent; parent = webkit_dom_node_get_parent_node (parent); -- cgit v1.2.3