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

@ -1,7 +1,6 @@
#ifndef GAMESMODEL_H
#define GAMESMODEL_H
#include "../client/tabs/tab_supervisor.h"
#include "game_type_map.h"
#include "pb/serverinfo_game.pb.h"
@ -12,6 +11,8 @@
#include <QStringList>
#include <QTime>
class UserlistProxy;
class GamesModel : public QAbstractTableModel
{
Q_OBJECT
@ -65,8 +66,7 @@ class GamesProxyModel : public QSortFilterProxyModel
{
Q_OBJECT
private:
bool ownUserIsRegistered;
const TabSupervisor *tabSupervisor;
const UserlistProxy *userListProxy;
// If adding any additional filters, make sure to update:
// - GamesProxyModel()
@ -88,7 +88,7 @@ private:
showOnlyIfSpectatorsCanSeeHands;
public:
GamesProxyModel(QObject *parent = nullptr, const TabSupervisor *_tabSupervisor = nullptr);
GamesProxyModel(QObject *parent = nullptr, const UserlistProxy *_userListProxy = nullptr);
bool getShowBuddiesOnlyGames() const
{