From 0a34a158377488653bb9c78a98cce9e0d1a7235f Mon Sep 17 00:00:00 2001 From: hua_yadong Date: Sat, 25 Nov 2023 15:38:18 +0800 Subject: [PATCH] fix coredump of kylin-weather (cherry picked from commit 5e9d9cd83ecda309d6f62f0425b8086d62944802) --- 0001-fix-coredump-of-kylin-weather.patch | 28 ++++++++++++++++++++++++ kylin-weather.spec | 7 +++++- 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 0001-fix-coredump-of-kylin-weather.patch diff --git a/0001-fix-coredump-of-kylin-weather.patch b/0001-fix-coredump-of-kylin-weather.patch new file mode 100644 index 0000000..404e9e5 --- /dev/null +++ b/0001-fix-coredump-of-kylin-weather.patch @@ -0,0 +1,28 @@ +From 009af8191dbed71fa5ea6a9a6db0b82bb20913ce Mon Sep 17 00:00:00 2001 +From: hua_yadong +Date: Sat, 25 Nov 2023 15:50:47 +0800 +Subject: [PATCH] fix coredump of kylin-weather + +--- + view/horscreen/perhour.cpp | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/view/horscreen/perhour.cpp b/view/horscreen/perhour.cpp +index f787ed5..396a174 100644 +--- a/view/horscreen/perhour.cpp ++++ b/view/horscreen/perhour.cpp +@@ -56,7 +56,10 @@ perhour::perhour(QWidget *parent) : QWidget(parent) + + // 逐小时信息 + void perhour::setHourlyInfor(QList tmp_list , int m_isFullScreen) +-{ ++{ ++ if (tmp_list.isEmpty()) { ++ return; ++ } + tmpList = tmp_list; + if ( m_isFullScreen == 0 ) // 普通界面 + { +-- +2.41.0 + diff --git a/kylin-weather.spec b/kylin-weather.spec index 7a0d6b5..41ae103 100644 --- a/kylin-weather.spec +++ b/kylin-weather.spec @@ -1,11 +1,12 @@ Name: kylin-weather Version: 3.1.2 -Release: 2 +Release: 3 Summary: Indicator that displays China weather information License: GPL-3.0+ URL: https://gitee.com/openkylin/kylin-weather Source0: %{name}-%{version}.tar.gz Patch01: 0001-fix-compile-error-of-kylin-weather.patch +Patch02: 0001-fix-coredump-of-kylin-weather.patch BuildRequires: qt5-qtbase-devel BuildRequires: qtchooser @@ -28,6 +29,7 @@ change it. %prep %setup -q %patch01 -p1 +%patch02 -p1 %build mkdir build && pushd build @@ -62,6 +64,9 @@ fi %{_datadir}/kylin-user-guide/* %changelog +* Sat Nov 25 2023 hua_yadong - 3.1.2-3 +- add 0001-fix-coredump-of-kylin-weather.patch + * Tue May 30 2023 peijiankang - 3.1.2-2 - fix install warining