File: fix-crash-when-access-kwin-dbus.patch

package info (click to toggle)
ukui-settings-daemon 3.1.1.1-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 2,704 kB
  • sloc: cpp: 22,760; ansic: 3,058; xml: 1,041; sh: 95; makefile: 4
file content (14 lines) | stat: -rw-r--r-- 589 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
--- a/plugins/color/color-manager.cpp
+++ b/plugins/color/color-manager.cpp
@@ -401,6 +401,11 @@ bool ColorManager::ReadKwinColorTempConf
                             "org.ukui.kwin.ColorCorrect",
                             QDBusConnection::sessionBus());
 
+    if (!colorIft.isValid()) {
+        USD_LOG(LOG_DEBUG, "org.ukui.kwin.ColorCorrect is not valid interface");
+        return false;
+    }
+
     QDBusMessage result = colorIft.call("nightColorInfo");
     const QDBusArgument &dbusArgs = result.arguments().at(0).value<QDBusArgument>().asVariant().value<QDBusArgument>();