diff --git a/widget/widget.cpp b/widget/widget.cpp index 0b1a4ba51..650d2499d 100644 --- a/widget/widget.cpp +++ b/widget/widget.cpp @@ -616,7 +616,7 @@ void Widget::onGroupMessageReceived(int groupnumber, int friendgroupnumber, cons g->chatForm->addGroupMessage(message, friendgroupnumber); - if ((isGroupWidgetActive != 1 || (g->groupId != activeGroupWidget->groupId)) || isWindowMinimized || !isActiveWindow()) + if ((isGroupWidgetActive != 1 || (activeGroupWidget && g->groupId != activeGroupWidget->groupId)) || isWindowMinimized || !isActiveWindow()) { if (message.contains(core->getUsername(), Qt::CaseInsensitive)) {