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:
parent
93c6aa8ac0
commit
e24f3dbc20
|
@ -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();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user