[Box Backup-commit] COMMIT r1968 - box/chris/general/lib/common
boxbackup-dev at fluffy.co.uk
boxbackup-dev at fluffy.co.uk
Sat Dec 8 22:49:46 GMT 2007
Author: chris
Date: 2007-12-08 22:49:46 +0000 (Sat, 08 Dec 2007)
New Revision: 1968
Modified:
box/chris/general/lib/common/Timer.cpp
Log:
Don't crash when trying to cleanup timers a second time (or if never
initialised) in release mode. (merges [1934])
Modified: box/chris/general/lib/common/Timer.cpp
===================================================================
--- box/chris/general/lib/common/Timer.cpp 2007-12-08 22:40:47 UTC (rev 1967)
+++ box/chris/general/lib/common/Timer.cpp 2007-12-08 22:49:46 UTC (rev 1968)
@@ -65,6 +65,11 @@
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
More information about the Boxbackup-commit
mailing list