fix accounts crash

fixes #4541
introduced in
3c46d8a412
The original commit introduced m_name but never used it.
When the endActivity would be called with a count of 0 this would crash
the laucnher.
How to reproduce: try to switch your skin in quick succession until you
get 429 too many requests as response to the login.
I will also presume this is not the only crash caused by this(hopefully
it is as it was not catched for four years)

Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
Trial97 2025-12-20 23:23:27 +02:00
parent d3f59a8a43
commit f4b22dae90
No known key found for this signature in database
GPG Key ID: 55EF5DA53DB36318
2 changed files with 1 additions and 2 deletions

View File

@ -669,7 +669,7 @@ void AccountList::beginActivity()
void AccountList::endActivity()
{
if (m_activityCount == 0) {
qWarning() << m_name << " - Activity count would become below zero";
qWarning() << "Activity count would become below zero";
return;
}
bool deactivating = m_activityCount == 1;

View File

@ -111,7 +111,6 @@ class AccountList : public QAbstractListModel {
void endActivity();
private:
const char* m_name;
uint32_t m_activityCount = 0;
signals:
void listChanged();