From e24f3dbc20e066606a7d4ad7fe76a0cc9a078d4f Mon Sep 17 00:00:00 2001 From: PafXUS Date: Wed, 8 Jun 2016 20:30:57 +0300 Subject: [PATCH] fix(friendwidget): check pointer before using it --- src/widget/friendwidget.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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();