mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
fixed bug in using invalid iterator in ChatLobbyNotify
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@8432 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
31492c2f3a
commit
f53f451596
@ -125,7 +125,8 @@ void ChatLobbyUserNotify::iconClicked()
|
|||||||
rsMsgs->getChatLobbyList(lobbies);
|
rsMsgs->getChatLobbyList(lobbies);
|
||||||
bool doUpdate=false;
|
bool doUpdate=false;
|
||||||
|
|
||||||
for (lobby_map::iterator itCL=_listMsg.begin(); itCL!=_listMsg.end();++itCL) {
|
for (lobby_map::iterator itCL=_listMsg.begin(); itCL!=_listMsg.end();)
|
||||||
|
{
|
||||||
/// Create a menu per lobby ///
|
/// Create a menu per lobby ///
|
||||||
bool bFound=false;
|
bool bFound=false;
|
||||||
QString strLobbyName=tr("Unknown Lobby");
|
QString strLobbyName=tr("Unknown Lobby");
|
||||||
@ -143,10 +144,17 @@ void ChatLobbyUserNotify::iconClicked()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (bFound){
|
if (bFound)
|
||||||
makeSubMenu(trayMenu, icoLobby, strLobbyName, itCL->first);
|
{
|
||||||
} else {
|
makeSubMenu(trayMenu, icoLobby, strLobbyName, itCL->first);
|
||||||
_listMsg.erase(itCL);
|
++itCL ;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
lobby_map::iterator ittmp(itCL);
|
||||||
|
++ittmp ;
|
||||||
|
_listMsg.erase(itCL);
|
||||||
|
itCL=ittmp ;
|
||||||
doUpdate=true;
|
doUpdate=true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user