Fix undefined behaviour when loading non-existant credentials (#4674)
Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
This commit is contained in:
@@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user