From a9094f8faf1e56acbff95e8dcc5fa80d988e4f2e Mon Sep 17 00:00:00 2001 From: thunder2 Date: Sun, 12 Jul 2015 21:10:03 +0000 Subject: [PATCH] Fixed crash in ChatLobbyUserNotify::subMenuClicked when using "Remove All" of the chat lobby notifier. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@8603 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- retroshare-gui/src/gui/chat/ChatLobbyUserNotify.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/retroshare-gui/src/gui/chat/ChatLobbyUserNotify.cpp b/retroshare-gui/src/gui/chat/ChatLobbyUserNotify.cpp index 0dfcbffc8..68c31417b 100644 --- a/retroshare-gui/src/gui/chat/ChatLobbyUserNotify.cpp +++ b/retroshare-gui/src/gui/chat/ChatLobbyUserNotify.cpp @@ -328,7 +328,8 @@ void ChatLobbyUserNotify::subMenuClicked(QAction* action) if (count==0) _listMsg.erase(itCL); emit countChanged(actionTag.cli, count); } else if(actionTag.cli==0x0){ - for(itCL=_listMsg.begin();itCL!=_listMsg.end();++itCL){ + while (!_listMsg.empty()) { + itCL = _listMsg.begin(); emit countChanged(itCL->first, 0); _listMsg.erase(itCL); }