X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Ftimer.cpp;h=27f2aecfdca8dd5cf8d5eb3f72b7287da90ba885;hb=fd820825ac669c9cd8cc8b7a69ca855159b0d3cb;hp=ca7534a7c7409759d42808258c3162db706f019a;hpb=c88afe5b9abba09b883d59f46a7e2795df181394;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/timer.cpp b/src/timer.cpp index ca7534a7c..27f2aecfd 100644 --- a/src/timer.cpp +++ b/src/timer.cpp @@ -2,7 +2,7 @@ * | Inspire Internet Relay Chat Daemon | * +------------------------------------+ * - * InspIRCd: (C) 2002-2008 InspIRCd Development Team + * InspIRCd: (C) 2002-2009 InspIRCd Development Team * See: http://www.inspircd.org/wiki/index.php/Credits * * This program is free but copyrighted software; see @@ -11,7 +11,7 @@ * --------------------------------------------------- */ -/* $Core: libIRCDtimer */ +/* $Core */ #include "inspircd.h" #include "timer.h" @@ -26,6 +26,9 @@ void TimerManager::TickTimers(time_t TIME) { std::vector::iterator i = Timers.begin(); Timer *t = (*i); + + // Probable fix: move vector manipulation to *before* we modify the vector. + Timers.erase(i); t->Tick(TIME); if (t->GetRepeat()) @@ -35,8 +38,6 @@ void TimerManager::TickTimers(time_t TIME) } else delete t; - - Timers.erase(i); } }