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
This commit is contained in:
Stefan Schmidt 2020-04-22 17:44:04 +02:00
parent d4c8bd4f4f
commit f5516e896d
1 changed files with 11 additions and 5 deletions

View File

@ -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;