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
This commit is contained in:
thunder2 2015-07-12 21:10:03 +00:00
parent 951a1f9454
commit a9094f8faf

View File

@ -328,7 +328,8 @@ void ChatLobbyUserNotify::subMenuClicked(QAction* action)
if (count==0) _listMsg.erase(itCL); if (count==0) _listMsg.erase(itCL);
emit countChanged(actionTag.cli, count); emit countChanged(actionTag.cli, count);
} else if(actionTag.cli==0x0){ } else if(actionTag.cli==0x0){
for(itCL=_listMsg.begin();itCL!=_listMsg.end();++itCL){ while (!_listMsg.empty()) {
itCL = _listMsg.begin();
emit countChanged(itCL->first, 0); emit countChanged(itCL->first, 0);
_listMsg.erase(itCL); _listMsg.erase(itCL);
} }