[evolution/wip/webkit-composer: 243/372] 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: 243/372] editor_widget_check_magic_smileys: Add checks to avoid crashing.
- Date: Thu, 6 Feb 2014 11:43:56 +0000 (UTC)
commit 919c7c08aa13100d5726d6925f3d81967ac9ed26
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]