summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Schmidt <s.schmidt@samsung.com>2020-04-22 17:44:04 +0200
committerStefan Schmidt <s.schmidt@samsung.com>2020-04-23 13:21:54 +0200
commitf5516e896d690a233c1747cdc7c893db15c240c1 (patch)
treeca8f2347ce9d049911b5cc5df16a506ac11db706
parentd4c8bd4f4fcdca9aa18c2c9400fb8a1f6449e7a5 (diff)
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.c16
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)
508 } 508 }
509 else 509 else
510 { 510 {
511 if (act->type != EXACTNESS_ACTION_STABILIZE) 511 if (act && act->type != EXACTNESS_ACTION_STABILIZE)
512 { 512 {
513 act = eina_list_data_get(_cur_event_list); 513 act = eina_list_data_get(_cur_event_list);
514 DBG(" %s timer_time=<%f>\n", __func__, act->delay_ms / 1000.0); 514 if (act && act->delay_ms)
515 ecore_timer_add(act->delay_ms / 1000.0, _feed_event_timer_cb, NULL); 515 {
516 DBG(" %s timer_time=<%f>\n", __func__, act->delay_ms / 1000.0);
517 ecore_timer_add(act->delay_ms / 1000.0, _feed_event_timer_cb, NULL);
518 }
516 } 519 }
517 } 520 }
518 return ECORE_CALLBACK_CANCEL; 521 return ECORE_CALLBACK_CANCEL;
@@ -549,8 +552,11 @@ _stabilization_timer_cb(void *data EINA_UNUSED)
549 if (_src_type != FTYPE_REMOTE && !_pause_request) 552 if (_src_type != FTYPE_REMOTE && !_pause_request)
550 { 553 {
551 Exactness_Action *act = eina_list_data_get(_cur_event_list); 554 Exactness_Action *act = eina_list_data_get(_cur_event_list);
552 DBG(" %s timer_time=<%f>\n", __func__, act->delay_ms / 1000.0); 555 if (act && act->delay_ms)
553 ecore_timer_add(act->delay_ms / 1000.0, _feed_event_timer_cb, NULL); 556 {
557 DBG(" %s timer_time=<%f>\n", __func__, act->delay_ms / 1000.0);
558 ecore_timer_add(act->delay_ms / 1000.0, _feed_event_timer_cb, NULL);
559 }
554 } 560 }
555 need_more = STAB_MAX; 561 need_more = STAB_MAX;
556 return ECORE_CALLBACK_CANCEL; 562 return ECORE_CALLBACK_CANCEL;