mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2025-12-28 06:34:27 +00:00
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:
parent
d3f59a8a43
commit
f4b22dae90
@ -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;
|
||||
|
||||
@ -111,7 +111,6 @@ class AccountList : public QAbstractListModel {
|
||||
void endActivity();
|
||||
|
||||
private:
|
||||
const char* m_name;
|
||||
uint32_t m_activityCount = 0;
|
||||
signals:
|
||||
void listChanged();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user