fix(coredump): Fix crash when clicking on the power option button in vnc

- 修复在vnc下点击电源选项按钮崩溃

Signed-off-by: huangjiawen <huangjiawen@kylinsec.com.cn>
This commit is contained in:
huangjiawen 2023-06-30 09:21:00 +08:00
parent 5a41eeb50e
commit e85c6a3a71
2 changed files with 37 additions and 1 deletions

View File

@ -0,0 +1,31 @@
From f5d0a115fa44bd1a3a61b2a109956a15130e11e4 Mon Sep 17 00:00:00 2001
From: huangjiawen <huangjiawen@kylinsec.com.cn>
Date: Tue, 27 Jun 2023 18:51:42 +0800
Subject: [PATCH] fix(coredump): Fix crash when clicking on the power option
button in vnc
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- 修复在vnc下点击电源选项按钮崩溃
Signed-off-by: huangjiawen <huangjiawen@kylinsec.com.cn>
---
src/common/kiran-power.cpp | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/common/kiran-power.cpp b/src/common/kiran-power.cpp
index 9ef8a2c..8485a9f 100644
--- a/src/common/kiran-power.cpp
+++ b/src/common/kiran-power.cpp
@@ -366,6 +366,7 @@ bool KiranPower::can_logout()
bool KiranPower::can_switch_user()
{
RETURN_VAL_IF_TRUE(this->settings_->get_boolean(STARTMENU_LOCKDOWN_KEY_DISABLE_USER_SWITCHING), false);
+ RETURN_VAL_IF_FALSE(this->seat_manager_proxy_, false);
try
{
--
2.33.0

View File

@ -1,11 +1,13 @@
Name: kiran-menu
Version: 2.5.1
Release: 1
Release: 2
Summary: Applets for mate panel from Kiran Desktop
License: MulanPSL-2.0
Source0: %{name}-%{version}.tar.gz
Patch0001: 0001-fix-coredump-Fix-crash-when-clicking-on-the-power-op.patch
BuildRequires: cmake > 3.0
BuildRequires: gcc-c++
BuildRequires: gtkmm30-devel
@ -96,6 +98,9 @@ gtk-update-icon-cache -f /usr/share/icons/hicolor/
%changelog
* Fri Jun 30 2023 huangjiawen <huangjiawen@kylinsec.com.cn> - 2.5.1-2
- KYOS-F: Fix crash when clicking on the power option button in vnc.
* Wed May 10 2023 tangjie02 <tangjie02@kylinsec.com.cn> - 2.5.1-1
- KYOS-F: replace suspend/hibernate/shutdown api with SessionManager.