From e824278870b2c75332b94bb2226d8ec5d86687d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6nke=20Ludwig?= Date: Wed, 19 Oct 2016 22:00:22 +0200 Subject: [PATCH] Fix possible null pointer access. --- source/eventcore/drivers/timer.d | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/eventcore/drivers/timer.d b/source/eventcore/drivers/timer.d index 5248d43..dd63479 100644 --- a/source/eventcore/drivers/timer.d +++ b/source/eventcore/drivers/timer.d @@ -64,7 +64,7 @@ final class LoopTimeoutTimerDriver : EventDriverTimers { foreach (tm; m_firedTimers) { auto cb = tm.callback; tm.callback = null; - cb(tm.id); + if (cb) cb(tm.id); } bool any_fired = m_firedTimers.length > 0;