From 77a03ce2823fa8b80802d3f0f12ba4f7bca4c21f Mon Sep 17 00:00:00 2001 From: Tomas Popela Date: Tue, 15 Jul 2014 13:54:30 +0200 Subject: EHTMLEditorSelection - Avoid runtime warning when there is no selection or the whole body element is selected --- e-util/e-html-editor-selection.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/e-util/e-html-editor-selection.c b/e-util/e-html-editor-selection.c index d329489922..56d7d8b1d7 100644 --- a/e-util/e-html-editor-selection.c +++ b/e-util/e-html-editor-selection.c @@ -2522,6 +2522,10 @@ get_element_for_inspection (WebKitDOMRange *range) WebKitDOMNode *node; node = webkit_dom_range_get_end_container (range, NULL); + /* No selection or whole body selected */ + if (WEBKIT_DOM_IS_HTML_BODY_ELEMENT (node)) + return NULL; + return WEBKIT_DOM_ELEMENT (get_parent_indented_block (node)); } -- cgit v1.2.3