summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/ecore/efl_promise.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/ecore/efl_promise.c b/src/lib/ecore/efl_promise.c
index 8cbde0ece8..c5ff17cec5 100644
--- a/src/lib/ecore/efl_promise.c
+++ b/src/lib/ecore/efl_promise.c
@@ -39,6 +39,7 @@ struct _Efl_Promise_Data
39static void 39static void
40_efl_promise_msg_free(Efl_Promise_Msg *msg) 40_efl_promise_msg_free(Efl_Promise_Msg *msg)
41{ 41{
42 if (!msg) return ;
42 if (msg->free_cb) 43 if (msg->free_cb)
43 msg->free_cb(msg->value); 44 msg->free_cb(msg->value);
44 free(msg); 45 free(msg);
@@ -737,8 +738,9 @@ _efl_promise_all_free(Efl_Promise_All *all)
737 738
738 EINA_ARRAY_ITER_NEXT(&all->members, i, fa, iterator) 739 EINA_ARRAY_ITER_NEXT(&all->members, i, fa, iterator)
739 { 740 {
740 EINA_REFCOUNT_UNREF(fa->d) 741 if (fa->d)
741 _efl_promise_msg_free(fa->d); 742 EINA_REFCOUNT_UNREF(fa->d)
743 _efl_promise_msg_free(fa->d);
742 } 744 }
743 efl_del(all->promise); 745 efl_del(all->promise);
744 all->promise = NULL; 746 all->promise = NULL;