fix segfault that happens when account tab is closed (#5474)

This commit is contained in:
RickyRister 2025-01-14 22:10:03 -08:00 committed by GitHub
parent d09b9eb533
commit 23bd18a04c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
19 changed files with 332 additions and 121 deletions

View file

@ -4,6 +4,7 @@
#include "../../main.h"
#include "../../server/chat_view/chat_view.h"
#include "../../server/pending_command.h"
#include "../../server/user/user_list_manager.h"
#include "../../settings/cache_settings.h"
#include "../game_logic/abstract_client.h"
#include "../sound_engine.h"
@ -25,7 +26,7 @@ TabMessage::TabMessage(TabSupervisor *_tabSupervisor,
: Tab(_tabSupervisor), client(_client), ownUserInfo(new ServerInfo_User(_ownUserInfo)),
otherUserInfo(new ServerInfo_User(_otherUserInfo)), userOnline(true)
{
chatView = new ChatView(tabSupervisor, tabSupervisor, 0, true);
chatView = new ChatView(tabSupervisor, tabSupervisor->getUserListManager(), 0, true);
connect(chatView, &ChatView::showCardInfoPopup, this, &TabMessage::showCardInfoPopup);
connect(chatView, SIGNAL(deleteCardInfoPopup(QString)), this, SLOT(deleteCardInfoPopup(QString)));
connect(chatView, SIGNAL(addMentionTag(QString)), this, SLOT(addMentionTag(QString)));