summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Zaoui <daniel.zaoui@samsung.com>2014-11-20 11:41:47 +0200
committerDaniel Zaoui <daniel.zaoui@samsung.com>2014-11-20 11:41:47 +0200
commit09456566a339e8cdc6f0e8a2111e75f4c275b599 (patch)
tree8f4e0450f42daa5a1bbe6fdffcfdbb1b0b3c7b6e
parent0a40a870395f6d181767dabadce753224376f89a (diff)
Text: Fix segfault when a test is re-executed.
It happens in the text append test. One of the internal pointers was pointing to freed memory.
-rw-r--r--src/bin/textblock_text_append.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/bin/textblock_text_append.c b/src/bin/textblock_text_append.c
index 4daa8cf..2b34482 100644
--- a/src/bin/textblock_text_append.c
+++ b/src/bin/textblock_text_append.c
@@ -106,6 +106,7 @@ static void _setup(void)
106static void _cleanup(void) 106static void _cleanup(void)
107{ 107{
108 eo_del(o_text); 108 eo_del(o_text);
109 o_text = NULL;
109} 110}
110 111
111/* loop - do things */ 112/* loop - do things */
@@ -118,6 +119,7 @@ static void _loop(double t, int f)
118 evas_textblock_cursor_char_delete(cur); 119 evas_textblock_cursor_char_delete(cur);
119 120
120 evas_textblock_cursor_paragraph_char_first(cur); 121 evas_textblock_cursor_paragraph_char_first(cur);
122 if (!o_text) cur2 = NULL;
121 if (!cur2) 123 if (!cur2)
122 { 124 {
123 eo_do(o_text, cur2 = evas_obj_textblock_cursor_new()); 125 eo_do(o_text, cur2 = evas_obj_textblock_cursor_new());