1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

fix(friendwidget): check pointer before using it

This commit is contained in:
PafXUS 2016-06-08 20:30:57 +03:00
parent 93c6aa8ac0
commit e24f3dbc20
No known key found for this signature in database
GPG Key ID: EE6F45227424D1B7

View File

@ -78,7 +78,7 @@ void FriendWidget::contextMenuEvent(QContextMenuEvent * event)
if (contentDialog == nullptr || notAlone) if (contentDialog == nullptr || notAlone)
openChatWindow = menu.addAction(tr("Open chat in new window")); openChatWindow = menu.addAction(tr("Open chat in new window"));
if (contentDialog->hasFriendWidget(friendId, this)) if (contentDialog != nullptr && contentDialog->hasFriendWidget(friendId, this))
removeChatWindow = menu.addAction(tr("Remove chat from this window")); removeChatWindow = menu.addAction(tr("Remove chat from this window"));
menu.addSeparator(); menu.addSeparator();