diff options
author | Chris Wilson <chris+github@qwirx.com> | 2007-12-02 22:50:36 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2007-12-02 22:50:36 +0000 |
commit | 99d5e37ca9d6485673d8afcf92f90e5ea671cf80 (patch) | |
tree | 74fd7ed7ce70169b78d1ef270b286a3a8d975001 | |
parent | 79d15e6bf2b7c05c487b452a2f8e5e30f3505317 (diff) |
Don't crash when trying to cleanup timers a second time (or if never
initialised) in release mode.
-rw-r--r-- | lib/common/Timer.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/common/Timer.cpp b/lib/common/Timer.cpp index 57ec6ce6..ca661855 100644 --- a/lib/common/Timer.cpp +++ b/lib/common/Timer.cpp @@ -65,6 +65,11 @@ void Timers::Init() void Timers::Cleanup() { ASSERT(spTimers); + if (!spTimers) + { + BOX_ERROR("Tried to clean up timers when not initialised!"); + return; + } #if defined WIN32 && ! defined PLATFORM_CYGWIN // no support for signals at all |