[Box Backup-commit] COMMIT r1389 - box/chris/merge/lib/common

boxbackup-dev at fluffy.co.uk boxbackup-dev at fluffy.co.uk
Sat Mar 10 16:49:34 GMT 2007


Author: chris
Date: 2007-03-10 16:49:34 +0000 (Sat, 10 Mar 2007)
New Revision: 1389

Modified:
   box/chris/merge/lib/common/Timer.cpp
Log:
Throw an assertion error if a NULL timer is added (refs #3, merges [1367])


Modified: box/chris/merge/lib/common/Timer.cpp
===================================================================
--- box/chris/merge/lib/common/Timer.cpp	2007-03-10 16:23:12 UTC (rev 1388)
+++ box/chris/merge/lib/common/Timer.cpp	2007-03-10 16:49:34 UTC (rev 1389)
@@ -90,6 +90,7 @@
 void Timers::Add(Timer& rTimer)
 {
 	ASSERT(spTimers);
+	ASSERT(&rTimer);
 	spTimers->push_back(&rTimer);
 	Reschedule();
 }
@@ -106,11 +107,13 @@
 void Timers::Remove(Timer& rTimer)
 {
 	ASSERT(spTimers);
+	ASSERT(&rTimer);
 
 	bool restart = true;
 	while (restart)
 	{
 		restart = false;
+
 		for (std::vector<Timer*>::iterator i = spTimers->begin();
 			i != spTimers->end(); i++)
 		{




More information about the Boxbackup-commit mailing list