mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-30 08:51:04 +02:00
timerd/timermanager.cpp: fix using invalidated after erase iterator
Origin commit data
------------------
Branch: ni/coolstream
Commit: 1f415fb39e
Author: [CST] Focus <focus.cst@gmail.com>
Date: 2012-05-09 (Wed, 09 May 2012)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -212,8 +212,10 @@ void* CTimerManager::timerThread(void *arg)
|
|||||||
pos->second->printEvent();
|
pos->second->printEvent();
|
||||||
dprintf("\n");
|
dprintf("\n");
|
||||||
delete pos->second; // delete event
|
delete pos->second; // delete event
|
||||||
timerManager->events.erase(pos); // remove from list
|
timerManager->events.erase(pos++); // remove from list
|
||||||
timerManager->m_saveEvents = true;
|
timerManager->m_saveEvents = true;
|
||||||
|
if(pos == timerManager->events.end())
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
pthread_mutex_unlock(&tm_eventsMutex);
|
pthread_mutex_unlock(&tm_eventsMutex);
|
||||||
|
Reference in New Issue
Block a user