ukui-screensaver/0007-screen-saver-mode-is-set-to-single-and-the-problem-of-segfault.patch

29 lines
788 B
Diff

From 53c17d4f9cf4a85f662b2ebdbb97610cb91ed237 Mon Sep 17 00:00:00 2001
From: tanyulong <tanyulong@kylinos.cn>
Date: Mon, 1 Nov 2021 11:08:30 +0800
Subject: [PATCH] screen saver mode is set to single and the problem of
segfault
---
src/configuration.cpp | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/configuration.cpp b/src/configuration.cpp
index 6590172..f67f844 100755
--- a/src/configuration.cpp
+++ b/src/configuration.cpp
@@ -141,6 +141,10 @@ ScreenSaver *Configuration::getScreensaver()
break;
}
case SAVER_SINGLE:
+ if(themes.count()==0){
+ saver->path = "/usr/lib/ukui-screensaver/ukui-screensaver-default";
+ break;
+ }
saver->path = getXScreensaverPath(themes[0]);
break;
case SAVER_IMAGE:
--
2.30.0