diff --git a/services/bundlemgr/src/bundle_mgr_host_impl.cpp b/services/bundlemgr/src/bundle_mgr_host_impl.cpp index 3506c1f14c35472d1ae2b8b5cbef5347c21e7ec0..76f4141af53f84b7c22ae6098915aab2302b02d9 100644 --- a/services/bundlemgr/src/bundle_mgr_host_impl.cpp +++ b/services/bundlemgr/src/bundle_mgr_host_impl.cpp @@ -6033,6 +6033,9 @@ bool BundleMgrHostImpl::SendQueryBundleInfoEvent( } size_t infoSize = infos.size(); + if (infoSize <= 0) { + return false; + } int32_t lastReportEventTime = infos[0].lastReportEventTime; if (infoSize >= MAX_QUERY_EVENT_REPORT_ONCE || (BundleUtil::GetCurrentTime() - lastReportEventTime) >= intervalTime) {