[plasma/libkscreen] src: Add null check for backend in SetConfigOperation::start()
zhang shoucheng <[email protected]> Tue, 4 Aug 2026 11:33:20 +0000 (UTC)
| Newsgroups | gmane.comp.kde.cvs |
|---|---|
| Message-ID | <[email protected]> |
Git commit 8a7b2988839ed86d778d0d4fe37b1376ef1ba13a by zhang shoucheng.
Committed on 04/08/2026 at 03:30.
Pushed by vladz into branch 'master'.
Add null check for backend in SetConfigOperation::start()
M +3 -0 src/setconfigoperation.cpp
https://invent.kde.org/plasma/libkscreen/-/commit/8a7b2988839ed86d778d0d4fe37b1376ef1ba13a
diff --git a/src/setconfigoperation.cpp b/src/setconfigoperation.cpp
index cab0028b..7c115cdd 100644
--- a/src/setconfigoperation.cpp
+++ b/src/setconfigoperation.cpp
@@ -65,6 +65,9 @@ void SetConfigOperation::start()
Q_D(SetConfigOperation);
d->fixPriorities();
auto backend = d->loadBackend();
+ if (!backend) {
+ return; // loadBackend() already set error and called emitResult() for us
+ }
QFutureWatcher<SetConfigResult> *watcher = new QFutureWatcher<SetConfigResult>(this);
connect(watcher, &QFutureWatcher<SetConfigResult>::finished, this, [this, watcher]() {
watcher->deleteLater();