mirror of
https://github.com/overte-org/overte.git
synced 2025-04-08 17:54:20 +02:00
if there are no active agents in list begin() iterator should be end()
This commit is contained in:
parent
f3a9dcf777
commit
499899c6e0
1 changed files with 3 additions and 3 deletions
|
@ -64,8 +64,7 @@ AgentList::AgentList(char newOwnerType, unsigned int newSocketListenPort) :
|
|||
agentSocket(newSocketListenPort),
|
||||
ownerType(newOwnerType),
|
||||
socketListenPort(newSocketListenPort),
|
||||
lastAgentId(0)
|
||||
{
|
||||
lastAgentId(0) {
|
||||
pthread_mutex_init(&mutex, 0);
|
||||
}
|
||||
|
||||
|
@ -483,7 +482,8 @@ AgentList::iterator AgentList::begin() const {
|
|||
}
|
||||
}
|
||||
|
||||
return AgentListIterator(this, 0);
|
||||
// there's no alive agent to start from - return the end
|
||||
return end();
|
||||
}
|
||||
|
||||
AgentList::iterator AgentList::end() const {
|
||||
|
|
Loading…
Reference in a new issue