[plasma/kactivitymanagerd/Plasma/6.7] src/service/plugins/sqlite: StatsPlugin: Do not crash with wrong dbus calls
Akseli Lahtinen <[email protected]>
| Newsgroups | gmane.comp.kde.cvs |
|---|---|
| Message-ID | <[email protected]> |
Git commit a3904cb4ab04dee824dec7b7998e536302ec888a by Akseli Lahtinen. Committed on 18/08/2026 at 09:16. Pushed by akselmo into branch 'Plasma/6.7'. StatsPlugin: Do not crash with wrong dbus calls If user sends a dbus call that has no proper parameter, the params here would end up being empty. In those cases, just return false, instead of assert crashing on empty stringlist. CCBUG: 524352 (cherry picked from commit 3e1312c7f098c4349429d8a83ba1efdaac6d444f) Co-authored-by: Akseli Lahtinen <[email protected]> M +1 -1 src/service/plugins/sqlite/StatsPlugin.cpp https://invent.kde.org/plasma/kactivitymanagerd/-/commit/a3904cb4ab04dee824dec7b7998e536302ec888a diff --git a/src/service/plugins/sqlite/StatsPlugin.cpp b/src/service/plugins/sqlite/StatsPlugin.cpp index abd11aee..fabe69e2 100644 --- a/src/service/plugins/sqlite/StatsPlugin.cpp +++ b/src/service/plugins/sqlite/StatsPlugin.cpp @@ -574,7 +574,7 @@ void StatsPlugin::DeleteStatsForResource(const QString &activity, const QString bool StatsPlugin::isFeatureOperational(const QStringList &feature) const { - if (feature[0] == "isOTR") { + if (!feature.isEmpty() && feature[0] == "isOTR") { if (feature.size() != 2) return true;