aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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));
}