[evolution] EEditorDOMFunctions: Critical warning and possible crash when we cannot append the end node for spel
- From: Tomas Popela <tpopela src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] EEditorDOMFunctions: Critical warning and possible crash when we cannot append the end node for spel
- Date: Wed, 30 Nov 2016 14:52:29 +0000 (UTC)
commit 2061d97088b1f60ca1470527e6f2e33a964d351a
Author: Tomas Popela <tpopela redhat com>
Date: Wed Nov 30 15:48:36 2016 +0100
EEditorDOMFunctions: Critical warning and possible crash when we cannot append the end node for spell
checking
If we fail to obtain a parent node of the last element in the viewport
we still tried to append to it, but that only caused a critical warning,
but as a consequence a WebKitDOMRange object was not created and we
tried to unref it that lead to a crash. Be sure that we always append
the spell check end node.
.../web-extension/e-editor-dom-functions.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/modules/webkit-editor/web-extension/e-editor-dom-functions.c
b/src/modules/webkit-editor/web-extension/e-editor-dom-functions.c
index e90791f..1d1e4c1 100644
--- a/src/modules/webkit-editor/web-extension/e-editor-dom-functions.c
+++ b/src/modules/webkit-editor/web-extension/e-editor-dom-functions.c
@@ -886,7 +886,7 @@ e_editor_dom_force_spell_check_in_viewport (EEditorPage *editor_page)
parent = get_parent_block_element (WEBKIT_DOM_NODE (last_element));
webkit_dom_node_append_child (
- WEBKIT_DOM_NODE (parent), WEBKIT_DOM_NODE (text), NULL);
+ WEBKIT_DOM_NODE (parent ? parent : last_element), WEBKIT_DOM_NODE (text), NULL);
} else
webkit_dom_node_append_child (
WEBKIT_DOM_NODE (body), WEBKIT_DOM_NODE (text), NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]