[evolution/gnome-3-22] 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/gnome-3-22] EEditorDOMFunctions: Critical warning and possible crash when we cannot append the end node for spel
- Date: Wed, 30 Nov 2016 14:54:49 +0000 (UTC)
commit 9cef72782a0d62e1c52ba05637ea0d02e6df4c1d
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/modules/webkit-editor/web-extension/e-editor-dom-functions.c
b/modules/webkit-editor/web-extension/e-editor-dom-functions.c
index cd7e040..f9ade5e 100644
--- a/modules/webkit-editor/web-extension/e-editor-dom-functions.c
+++ b/modules/webkit-editor/web-extension/e-editor-dom-functions.c
@@ -888,7 +888,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]