summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmitesh Singh <amitesh.sh@samsung.com>2014-10-19 14:55:02 +0900
committerChunEon Park <hermet@hermet.pe.kr>2014-10-19 14:57:30 +0900
commite80f82e95c7eedabaf16b5ef1f1d10495e9f26a0 (patch)
tree0c378bd7ec22e5cbf01b857da2cfb9126581ad7b
parente4c51e69a908f95d8b0568fbfbc132101ad1597c (diff)
widget: fix seg fault when ts is NULL.
Summary: if translatable is FALSE and _translate_string_data_get returns NULL, ts would be NULL which results into crash. @fix Reviewers: seoz, raster, Hermet Reviewed By: Hermet Subscribers: seoz Differential Revision: https://phab.enlightenment.org/D1543
-rw-r--r--src/lib/elm_widget.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/lib/elm_widget.c b/src/lib/elm_widget.c
index d6af6ffbe..b0f4b434b 100644
--- a/src/lib/elm_widget.c
+++ b/src/lib/elm_widget.c
@@ -3219,16 +3219,13 @@ _part_text_translatable_set(Eina_Inlist **translate_strings, const char *part, E
3219 } 3219 }
3220 //Delete this exist one if this part has been not preset. 3220 //Delete this exist one if this part has been not preset.
3221 //see elm_widget_part_text_translatable_set() 3221 //see elm_widget_part_text_translatable_set()
3222 else if ((preset) || (!ts->preset)) 3222 else if (ts && ((preset) || (!ts->preset)))
3223 { 3223 {
3224 if (ts) 3224 t = eina_inlist_remove(t, EINA_INLIST_GET(ts));
3225 { 3225 eina_stringshare_del(ts->id);
3226 t = eina_inlist_remove(t, EINA_INLIST_GET(ts)); 3226 eina_stringshare_del(ts->domain);
3227 eina_stringshare_del(ts->id); 3227 eina_stringshare_del(ts->string);
3228 eina_stringshare_del(ts->domain); 3228 ELM_SAFE_FREE(ts, free);
3229 eina_stringshare_del(ts->string);
3230 ELM_SAFE_FREE(ts, free);
3231 }
3232 } 3229 }
3233 3230
3234 *translate_strings = t; 3231 *translate_strings = t;