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

