summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorHermet Park <hermetpark@gmail.com>2019-11-21 17:28:54 +0900
committerHermet Park <hermetpark@gmail.com>2019-11-21 17:28:54 +0900
commitce30a952b2521632c4cde8bbb5c33313c62e47ae (patch)
tree8d1a5a1b4e1ee4b9b8abea3b7f6341d3540d26c0 /src/modules
parent959c503a718ed548fa3251fc245bfe9c8c82d521 (diff)
downloadefl-ce30a952b2521632c4cde8bbb5c33313c62e47ae.tar.gz
vector json: checking valid pointer before accessing it.
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/evas/vg_loaders/json/evas_vg_load_json.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/modules/evas/vg_loaders/json/evas_vg_load_json.c b/src/modules/evas/vg_loaders/json/evas_vg_load_json.c
index 60a0d06916..ba60b444f1 100644
--- a/src/modules/evas/vg_loaders/json/evas_vg_load_json.c
+++ b/src/modules/evas/vg_loaders/json/evas_vg_load_json.c
@@ -20,14 +20,17 @@ evas_vg_load_file_close_json(Vg_File_Data *vfd)
Lottie_Animation *lot_anim = (Lottie_Animation *) vfd->loader_data;
lottie_animation_destroy(lot_anim);
- if (vfd->anim_data->markers)
+ if (vfd->anim_data)
{
- Vg_File_Anim_Data_Marker *marker;
- EINA_INARRAY_FOREACH(vfd->anim_data->markers, marker)
- if (marker->name) eina_stringshare_del(marker->name);
- eina_inarray_free(vfd->anim_data->markers);
+ if (vfd->anim_data->markers)
+ {
+ Vg_File_Anim_Data_Marker *marker;
+ EINA_INARRAY_FOREACH(vfd->anim_data->markers, marker)
+ if (marker->name) eina_stringshare_del(marker->name);
+ eina_inarray_free(vfd->anim_data->markers);
+ }
+ free(vfd->anim_data);
}
- if (vfd->anim_data) free(vfd->anim_data);
if (vfd->root) efl_unref(vfd->root);
free(vfd);