kylin-weather/0001-fix-coredump-of-kylin-weather.patch
hua_yadong 0a34a15837 fix coredump of kylin-weather
(cherry picked from commit 5e9d9cd83ecda309d6f62f0425b8086d62944802)
2023-11-25 16:03:11 +08:00

29 lines
776 B
Diff

From 009af8191dbed71fa5ea6a9a6db0b82bb20913ce Mon Sep 17 00:00:00 2001
From: hua_yadong <huayadong@kylinos.cn>
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<Hourly> tmp_list , int m_isFullScreen)
-{
+{
+ if (tmp_list.isEmpty()) {
+ return;
+ }
tmpList = tmp_list;
if ( m_isFullScreen == 0 ) // 普通界面
{
--
2.41.0