Fix undefined behaviour when loading non-existant credentials (#4674)

Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
This commit is contained in:
nerix 2023-06-10 12:11:05 +02:00 committed by GitHub
parent ca9c91a15b
commit f0c4eb7caa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View file

@ -15,6 +15,7 @@
- Dev: Added tools to help debug image GC. (#4578)
- Dev: Removed duplicate license when having plugins enabled. (#4665)
- Dev: Replace our QObjectRef class with Qt's QPointer class. (#4666)
- Dev: Fixed undefined behavior when loading non-existant credentials. (#4673)
## 2.4.4

View file

@ -197,9 +197,9 @@ void Credentials::get(const QString &provider, const QString &name_,
}
else
{
auto &instance = insecureInstance();
const auto &instance = insecureInstance();
onLoaded(instance.object().find(name).value().toString());
onLoaded(instance[name].toString());
}
}