diff --git a/src/main.c b/src/main.c index 4484f0a..e019765 100644 --- a/src/main.c +++ b/src/main.c @@ -69,7 +69,7 @@ static int trigger_event(block *const blocks, const unsigned short block_count, static int refresh_callback(block *const blocks, const unsigned short block_count) { - if (execute_blocks(blocks, block_count, 0) != 0) { + if (execute_blocks(blocks, block_count, NULL) != 0) { return 1; } diff --git a/src/timer.c b/src/timer.c index 2454fb9..2ee555b 100644 --- a/src/timer.c +++ b/src/timer.c @@ -60,7 +60,7 @@ int timer_arm(timer *const timer) { } bool timer_must_run_block(const timer *const timer, const block *const block) { - if (timer->time == timer->reset_value) { + if (timer == NULL || timer->time == timer->reset_value) { return true; }