[evolution] Crash when making links clickable in composer



commit f7f7e92eca93eeafc3d8efeb6b46391092437605
Author: Milan Crha <mcrha redhat com>
Date:   Fri May 18 08:06:38 2018 +0200

    Crash when making links clickable in composer

 .../web-extension/e-editor-dom-functions.c         |    8 +++++---
 1 files changed, 5 insertions(+), 3 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 a835850..343b1c1 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
@@ -1594,11 +1594,13 @@ e_editor_dom_check_magic_links (EEditorPage *editor_page,
                webkit_dom_text_split_text (
                        WEBKIT_DOM_TEXT (node), url_start, NULL);
                url_text_node = webkit_dom_node_get_next_sibling (node);
-               url_text = webkit_dom_character_data_get_data (
-                       WEBKIT_DOM_CHARACTER_DATA (url_text_node));
+               if (url_text_node)
+                       url_text = webkit_dom_character_data_get_data (WEBKIT_DOM_CHARACTER_DATA 
(url_text_node));
+               else
+                       url_text = NULL;
 
                /* Sanity check */
-               if (strrchr (url_text, ' '))
+               if (!url_text || !*url_text || strrchr (url_text, ' '))
                        goto skip;
 
                if (g_str_has_prefix (url_text, "www."))


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]