Verified Commit 069bb65a authored by Daniel Vrátil's avatar Daniel Vrátil 🤖

fix: handle when backend fails to load/initialize

Summary:
Fixes a null pointer dereference in GetConfigOperation when BackendManager
fails to load a valid backend.

Reviewers: #plasma

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D27625
parent 691c8587
......@@ -171,6 +171,9 @@ void GetConfigOperation::start()
Q_D(GetConfigOperation);
if (BackendManager::instance()->method() == BackendManager::InProcess) {
auto backend = d->loadBackend();
if (!backend) {
return; // loadBackend() already set error and called emitResult() for us
}
d->config = backend->config()->clone();
d->loadEdid(backend);
emitResult();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment