Fixed possible crash in ChatLobbyDialog::init by checking return value of dynamic_cast.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@8591 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2015-07-12 00:54:42 +00:00
parent 65bdc96b88
commit 86a5c2e656

View File

@ -240,7 +240,10 @@ void ChatLobbyDialog::init()
// add to window
dynamic_cast<ChatLobbyWidget*>(MainWindow::getPage(MainWindow::ChatLobby))->addChatPage(this) ;
ChatLobbyWidget *chatLobbyPage = dynamic_cast<ChatLobbyWidget*>(MainWindow::getPage(MainWindow::ChatLobby));
if (chatLobbyPage) {
chatLobbyPage->addChatPage(this) ;
}
/** List of muted Participants */
mutedParticipants.clear() ;