Handle Timer.stop() gracefully for null timers.

This commit is contained in:
Sönke Ludwig 2017-01-30 17:34:25 +01:00
parent b7e996cd8c
commit c490a354b7
No known key found for this signature in database
GPG key ID: D95E8DB493EE314C

View file

@ -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.
*/