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:56:15 +0900
commit823c7b87be84b623a3c81dbcf0537bd192d43713 (patch)
tree0b6e3fc6fb3b606f18a92a04c18869f2b7295368
parented365503126a690e767f786dff24a06fbb77b72e (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 ab312b915..adf68dfd3 100644
--- a/src/lib/elm_widget.c
+++ b/src/lib/elm_widget.c
@@ -3218,16 +3218,13 @@ _part_text_translatable_set(Eina_Inlist **translate_strings, const char *part, E
3218 } 3218 }
3219 //Delete this exist one if this part has been not preset. 3219 //Delete this exist one if this part has been not preset.
3220 //see elm_widget_part_text_translatable_set() 3220 //see elm_widget_part_text_translatable_set()
3221 else if ((preset) || (!ts->preset)) 3221 else if (ts && ((preset) || (!ts->preset)))
3222 { 3222 {
3223 if (ts) 3223 t = eina_inlist_remove(t, EINA_INLIST_GET(ts));
3224 { 3224 eina_stringshare_del(ts->id);
3225 t = eina_inlist_remove(t, EINA_INLIST_GET(ts)); 3225 eina_stringshare_del(ts->domain);
3226 eina_stringshare_del(ts->id); 3226 eina_stringshare_del(ts->string);
3227 eina_stringshare_del(ts->domain); 3227 ELM_SAFE_FREE(ts, free);
3228 eina_stringshare_del(ts->string);
3229 ELM_SAFE_FREE(ts, free);
3230 }
3231 } 3228 }
3232 3229
3233 *translate_strings = t; 3230 *translate_strings = t;