From a0797d00e34a6a6985b28ef01504bd7a11ce8c72 Mon Sep 17 00:00:00 2001 From: Trial97 Date: Sat, 20 Dec 2025 23:23:27 +0200 Subject: [PATCH] fix accounts crash fixes #4541 introduced in https://github.com/PrismLauncher/PrismLauncher/commit/3c46d8a412956a759f61ae802c540ef72d00b35d 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 (cherry picked from commit f4b22dae90363f71a3203439111ad1596215b751) --- launcher/minecraft/auth/AccountList.cpp | 2 +- launcher/minecraft/auth/AccountList.h | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/launcher/minecraft/auth/AccountList.cpp b/launcher/minecraft/auth/AccountList.cpp index 3cbbb2a74..cef79d200 100644 --- a/launcher/minecraft/auth/AccountList.cpp +++ b/launcher/minecraft/auth/AccountList.cpp @@ -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; diff --git a/launcher/minecraft/auth/AccountList.h b/launcher/minecraft/auth/AccountList.h index d3be6740e..2f1276312 100644 --- a/launcher/minecraft/auth/AccountList.h +++ b/launcher/minecraft/auth/AccountList.h @@ -111,7 +111,6 @@ class AccountList : public QAbstractListModel { void endActivity(); private: - const char* m_name; uint32_t m_activityCount = 0; signals: void listChanged();