From 19f7c54e9aa3c5fb00c3a969aac63d1ddae82ae7 Mon Sep 17 00:00:00 2001 From: fangJinliang1 Date: Tue, 29 Nov 2022 11:03:18 +0800 Subject: [PATCH] tdd modify Signed-off-by: fangJinliang1 Change-Id: I6e926e73a9534b362382354f9368c79bd38a082e --- frameworks/ans/src/reminder_store.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/frameworks/ans/src/reminder_store.cpp b/frameworks/ans/src/reminder_store.cpp index 7f8b4b190..394ef58d1 100644 --- a/frameworks/ans/src/reminder_store.cpp +++ b/frameworks/ans/src/reminder_store.cpp @@ -380,6 +380,10 @@ sptr ReminderStore::BuildReminder(const std::shared_ptr &bundleOption) const { + if (rdbStore_ == nullptr) { + ANSR_LOGE("Rdb store is not initialized."); + return false; + } NativeRdb::AbsRdbPredicates absRdbPredicates(REMINDER_DB_TABLE); absRdbPredicates.EqualTo(ReminderRequest::REMINDER_ID, std::to_string(reminderId)); std::shared_ptr queryResultSet = rdbStore_->Query( -- Gitee