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
2 changed files with 3 additions and 2 deletions
+1
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
+2 -2
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());
}
}