[evolution/wip/webkit-composer: 177/262] editor_widget_check_magic_smileys: Add checks to avoid crashing.
- From: Tomas Popela <tpopela src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/wip/webkit-composer: 177/262] editor_widget_check_magic_smileys: Add checks to avoid crashing.
- Date: Thu, 16 Jan 2014 10:02:45 +0000 (UTC)
commit be346afb019295eb2877adf3f5f9e4475577cbe1
Author: Tomas Popela <tpopela redhat com>
Date: Thu Mar 14 18:03:44 2013 -0400
editor_widget_check_magic_smileys: Add checks to avoid crashing.
e-util/e-editor-widget.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/e-util/e-editor-widget.c b/e-util/e-editor-widget.c
index 4712f68..4e9cf0d 100644
--- a/e-util/e-editor-widget.c
+++ b/e-util/e-editor-widget.c
@@ -317,7 +317,13 @@ editor_widget_check_magic_smileys (EEditorWidget *widget,
return;
}
+ if (!WEBKIT_DOM_IS_TEXT (node))
+ return;
+
node_text = webkit_dom_text_get_whole_text ((WebKitDOMText *) node);
+ if (node_text == NULL)
+ return;
+
start = webkit_dom_range_get_end_offset (range, NULL) - 1;
pos = start;
state = 0;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]