From c490a354b7fca9ccbde17bc02228d30b9ca0bc77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6nke=20Ludwig?= Date: Mon, 30 Jan 2017 17:34:25 +0100 Subject: [PATCH] Handle Timer.stop() gracefully for null timers. --- source/vibe/core/core.d | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/vibe/core/core.d b/source/vibe/core/core.d index 4b85687..d02bc9e 100644 --- a/source/vibe/core/core.d +++ b/source/vibe/core/core.d @@ -1114,7 +1114,7 @@ struct Timer { /** Resets the timer and avoids any firing. */ - void stop() nothrow { m_driver.stop(m_id); } + void stop() nothrow { if (m_driver) m_driver.stop(m_id); } /** Waits until the timer fires. */