From 39ff3a2dcecacc985ace5619329b58471e4552c8 Mon Sep 17 00:00:00 2001 From: songbao1 Date: Thu, 12 Sep 2024 09:39:47 +0800 Subject: [PATCH] =?UTF-8?q?record=20=EF=BC=88cherry=20picked=20commit=20fr?= =?UTF-8?q?om=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- services/ans/src/advanced_notification_live_view_service.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/services/ans/src/advanced_notification_live_view_service.cpp b/services/ans/src/advanced_notification_live_view_service.cpp index ed39e55e2..f85bfb1da 100644 --- a/services/ans/src/advanced_notification_live_view_service.cpp +++ b/services/ans/src/advanced_notification_live_view_service.cpp @@ -162,7 +162,8 @@ void AdvancedNotificationService::OnSubscriberAdd( sptr sortingMap = GenerateSortingMap(); std::vector> notifications; for (auto notificationRecord : notificationList_) { - if (notificationRecord->notification != nullptr && + if (notificationRecord != nullptr && + notificationRecord->notification != nullptr && notificationRecord->notification->GetNotificationRequest().IsCommonLiveView()) { notifications.emplace_back(notificationRecord->notification); } -- Gitee