diff --git a/CHANGELOG.md b/CHANGELOG.md index 5d3d2090a..eaeb94f58 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/src/common/Credentials.cpp b/src/common/Credentials.cpp index f3985701f..d3bb5ebbd 100644 --- a/src/common/Credentials.cpp +++ b/src/common/Credentials.cpp @@ -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()); } }