summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWonki Kim <wonki_.kim@samsung.com>2020-08-05 15:14:24 +0900
committerJunsuChoi <jsuya.choi@samsung.com>2020-08-05 15:14:25 +0900
commit7dcd14347d0dca5e2bd5bc9c2b4d148607ac19f8 (patch)
tree84afa293b8cd037b6c86639129204be76a155a25
parent39e9740fca914a360c174cda88403f511181c79b (diff)
edje_edit: fix a potentional error of null deref
Summary: this is a patch to fix a potentional error by null dereferencing. Reviewers: jsuya, bu5hm4n, cedric, Hermet Reviewed By: jsuya Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D12090
-rw-r--r--src/lib/edje/edje_edit.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/lib/edje/edje_edit.c b/src/lib/edje/edje_edit.c
index b9ebf99926..4ee1f03580 100644
--- a/src/lib/edje/edje_edit.c
+++ b/src/lib/edje/edje_edit.c
@@ -13362,7 +13362,7 @@ _edje_generate_source_of_style(Edje *ed, const char *name, Eina_Strbuf *buf)
13362} 13362}
13363 13363
13364static Eina_Bool 13364static Eina_Bool
13365_edje_generate_source_of_program(Evas_Object *obj, const char *program, Eina_Strbuf *buf) 13365_edje_generate_source_of_program(Evas_Object *obj, const char *prog, Eina_Strbuf *buf)
13366{ 13366{
13367 Eina_List *l, *ll; 13367 Eina_List *l, *ll;
13368 const char *s; 13368 const char *s;
@@ -13371,15 +13371,13 @@ _edje_generate_source_of_program(Evas_Object *obj, const char *program, Eina_Str
13371 Eina_Bool ret = EINA_TRUE; 13371 Eina_Bool ret = EINA_TRUE;
13372 Eina_Bool no_transition = EINA_FALSE; 13372 Eina_Bool no_transition = EINA_FALSE;
13373 const char *api_name, *api_description; 13373 const char *api_name, *api_description;
13374 Edje_Program *epr;
13375 int tweenmode = 0; 13374 int tweenmode = 0;
13376 13375
13377 GET_ED_OR_RETURN(EINA_FALSE); 13376 GET_ED_OR_RETURN(EINA_FALSE);
13378 GET_EED_OR_RETURN(EINA_FALSE); 13377 GET_EED_OR_RETURN(EINA_FALSE);
13378 GET_EPR_OR_RETURN(EINA_FALSE);
13379 13379
13380 epr = _edje_program_get_byname(obj, program); 13380 BUF_APPENDF(I3 "program { name: \"%s\";\n", prog);
13381
13382 BUF_APPENDF(I3 "program { name: \"%s\";\n", program);
13383 13381
13384 /* Signal */ 13382 /* Signal */
13385 s = eina_stringshare_add(epr->signal); 13383 s = eina_stringshare_add(epr->signal);
@@ -13415,7 +13413,7 @@ _edje_generate_source_of_program(Evas_Object *obj, const char *program, Eina_Str
13415 if (epr->state) 13413 if (epr->state)
13416 { 13414 {
13417 BUF_APPENDF(I4 "action: STATE_SET \"%s\" %.2f;\n", epr->state, 13415 BUF_APPENDF(I4 "action: STATE_SET \"%s\" %.2f;\n", epr->state,
13418 edje_edit_program_value_get(obj, program)); 13416 edje_edit_program_value_get(obj, prog));
13419 } 13417 }
13420 break; 13418 break;
13421 13419