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@8433 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
f53f451596
commit
a34d9a07af
@ -127,22 +127,22 @@ void ChatLobbyUserNotify::iconClicked()
|
|||||||
|
|
||||||
for (lobby_map::iterator itCL=_listMsg.begin(); itCL!=_listMsg.end();)
|
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");
|
||||||
QIcon icoLobby=QIcon();
|
QIcon icoLobby=QIcon();
|
||||||
std::list<ChatLobbyId>::const_iterator lobbyIt;
|
std::list<ChatLobbyId>::const_iterator lobbyIt;
|
||||||
for (lobbyIt = lobbies.begin(); lobbyIt != lobbies.end(); ++lobbyIt) {
|
for (lobbyIt = lobbies.begin(); lobbyIt != lobbies.end(); ++lobbyIt) {
|
||||||
ChatLobbyId clId = *lobbyIt;
|
ChatLobbyId clId = *lobbyIt;
|
||||||
if (clId==itCL->first) {
|
if (clId==itCL->first) {
|
||||||
ChatLobbyInfo clInfo;
|
ChatLobbyInfo clInfo;
|
||||||
if (rsMsgs->getChatLobbyInfo(clId,clInfo))
|
if (rsMsgs->getChatLobbyInfo(clId,clInfo))
|
||||||
strLobbyName=QString::fromUtf8(clInfo.lobby_name.c_str()) ;
|
strLobbyName=QString::fromUtf8(clInfo.lobby_name.c_str()) ;
|
||||||
icoLobby=(clInfo.lobby_flags & RS_CHAT_LOBBY_FLAGS_PUBLIC) ? QIcon(":/images/chat_red24.png") : QIcon(":/images/chat_x24.png");
|
icoLobby=(clInfo.lobby_flags & RS_CHAT_LOBBY_FLAGS_PUBLIC) ? QIcon(":/images/chat_red24.png") : QIcon(":/images/chat_x24.png");
|
||||||
bFound=true;
|
bFound=true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (bFound)
|
if (bFound)
|
||||||
{
|
{
|
||||||
@ -155,9 +155,9 @@ void ChatLobbyUserNotify::iconClicked()
|
|||||||
++ittmp ;
|
++ittmp ;
|
||||||
_listMsg.erase(itCL);
|
_listMsg.erase(itCL);
|
||||||
itCL=ittmp ;
|
itCL=ittmp ;
|
||||||
doUpdate=true;
|
doUpdate=true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (notifyCombined()) {
|
if (notifyCombined()) {
|
||||||
QSystemTrayIcon* trayIcon=getTrayIcon();
|
QSystemTrayIcon* trayIcon=getTrayIcon();
|
||||||
|
Loading…
Reference in New Issue
Block a user