[evolution] EHTMLEditorSelection - Avoid runtime warning when there is no selection or the whole body element is
- From: Tomas Popela <tpopela src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] EHTMLEditorSelection - Avoid runtime warning when there is no selection or the whole body element is
- Date: Tue, 15 Jul 2014 11:59:48 +0000 (UTC)
commit 77a03ce2823fa8b80802d3f0f12ba4f7bca4c21f
Author: Tomas Popela <tpopela redhat com>
Date: Tue Jul 15 13:54:30 2014 +0200
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 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 d329489..56d7d8b 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));
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]