diff --git a/src/widget/friendwidget.cpp b/src/widget/friendwidget.cpp index b543da3a0..f4d2dd2f9 100644 --- a/src/widget/friendwidget.cpp +++ b/src/widget/friendwidget.cpp @@ -78,7 +78,7 @@ void FriendWidget::contextMenuEvent(QContextMenuEvent * event) if (contentDialog == nullptr || notAlone) 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")); menu.addSeparator();