aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomas Popela <tpopela@redhat.com>2014-07-15 19:54:30 +0800
committerTomas Popela <tpopela@redhat.com>2014-07-15 19:54:30 +0800
commit77a03ce2823fa8b80802d3f0f12ba4f7bca4c21f (patch)
tree4f58ecc1cdb3fd06c587864cad7d7f48ed09d2bc
parent6f7e23e6457fc899a060da453f37620897c1ba89 (diff)
downloadgsoc2013-evolution-77a03ce2823fa8b80802d3f0f12ba4f7bca4c21f.tar
gsoc2013-evolution-77a03ce2823fa8b80802d3f0f12ba4f7bca4c21f.tar.gz
gsoc2013-evolution-77a03ce2823fa8b80802d3f0f12ba4f7bca4c21f.tar.bz2
gsoc2013-evolution-77a03ce2823fa8b80802d3f0f12ba4f7bca4c21f.tar.lz
gsoc2013-evolution-77a03ce2823fa8b80802d3f0f12ba4f7bca4c21f.tar.xz
gsoc2013-evolution-77a03ce2823fa8b80802d3f0f12ba4f7bca4c21f.tar.zst
gsoc2013-evolution-77a03ce2823fa8b80802d3f0f12ba4f7bca4c21f.zip
EHTMLEditorSelection - Avoid runtime warning when there is no selection or the whole body element is selected
-rw-r--r--e-util/e-html-editor-selection.c4
1 files changed, 4 insertions, 0 deletions
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));
}