mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-07-06 13:26:58 +03:00
fix accounts crash
fixes #4541 introduced in3c46d8a412The 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> (cherry picked from commitf4b22dae90)
This commit is contained in:
parent
3d805dff29
commit
a0797d00e3
2 changed files with 1 additions and 2 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue