efl_ui_format: add null checking codes for eina_strftime in _do_format_string function

Summary: efl_ui_format: add null checking codes for eina_strftime in _do_format_string function

Reviewers: kimcinoo

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9735
This commit is contained in:
Taehyub Kim 2019-08-26 14:50:44 +09:00 committed by Shinwoo Kim
parent e742bf67e4
commit d53e46d76f
1 changed files with 6 additions and 3 deletions

View File

@ -136,11 +136,14 @@ _do_format_string(Efl_Ui_Format_Data *pd, Eina_Strbuf *str, const Eina_Value val
case FORMAT_TYPE_TM:
{
struct tm v;
char *buf;
char *buf = NULL;
eina_value_get(&value, &v);
buf = eina_strftime(pd->format_string, &v);
eina_strbuf_append(str, buf);
free(buf);
if (buf)
{
eina_strbuf_append(str, buf);
free(buf);
}
break;
}
default: