diff options
author | Stefan Schmidt <s.schmidt@samsung.com> | 2020-04-22 17:44:04 +0200 |
---|---|---|
committer | Stefan Schmidt <s.schmidt@samsung.com> | 2020-04-23 13:21:54 +0200 |
commit | f5516e896d690a233c1747cdc7c893db15c240c1 (patch) | |
tree | ca8f2347ce9d049911b5cc5df16a506ac11db706 | |
parent | d4c8bd4f4fcdca9aa18c2c9400fb8a1f6449e7a5 (diff) | |
download | efl-f5516e896d690a233c1747cdc7c893db15c240c1.tar.gz |
exactness: check action for NULL
If the given events list is NULL the data pointer would be as well. Make
sure we check for NULL here before accessing.
CID: 1419843
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D11754
-rw-r--r-- | src/bin/exactness/player.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/bin/exactness/player.c b/src/bin/exactness/player.c index 1e759e4c9b..befd028852 100644 --- a/src/bin/exactness/player.c +++ b/src/bin/exactness/player.c @@ -508,11 +508,14 @@ _feed_event_timer_cb(void *data EINA_UNUSED) } else { - if (act->type != EXACTNESS_ACTION_STABILIZE) + if (act && act->type != EXACTNESS_ACTION_STABILIZE) { act = eina_list_data_get(_cur_event_list); - DBG(" %s timer_time=<%f>\n", __func__, act->delay_ms / 1000.0); - ecore_timer_add(act->delay_ms / 1000.0, _feed_event_timer_cb, NULL); + if (act && act->delay_ms) + { + DBG(" %s timer_time=<%f>\n", __func__, act->delay_ms / 1000.0); + ecore_timer_add(act->delay_ms / 1000.0, _feed_event_timer_cb, NULL); + } } } return ECORE_CALLBACK_CANCEL; @@ -549,8 +552,11 @@ _stabilization_timer_cb(void *data EINA_UNUSED) if (_src_type != FTYPE_REMOTE && !_pause_request) { Exactness_Action *act = eina_list_data_get(_cur_event_list); - DBG(" %s timer_time=<%f>\n", __func__, act->delay_ms / 1000.0); - ecore_timer_add(act->delay_ms / 1000.0, _feed_event_timer_cb, NULL); + if (act && act->delay_ms) + { + DBG(" %s timer_time=<%f>\n", __func__, act->delay_ms / 1000.0); + ecore_timer_add(act->delay_ms / 1000.0, _feed_event_timer_cb, NULL); + } } need_more = STAB_MAX; return ECORE_CALLBACK_CANCEL; |