diff --git a/services/distributeddataservice/libs/distributeddb/common/src/user_change_monitor.cpp b/services/distributeddataservice/libs/distributeddb/common/src/user_change_monitor.cpp index 6add9c4d487da452396156e8ab20fcf72e4f4491..469933dabb972c6952a32f3cf8e4269c0f37426d 100644 --- a/services/distributeddataservice/libs/distributeddb/common/src/user_change_monitor.cpp +++ b/services/distributeddataservice/libs/distributeddb/common/src/user_change_monitor.cpp @@ -49,7 +49,7 @@ void UserChangeMonitor::Stop() if (!isStarted_) { return; } - if (userNotifier_ == nullptr) { + if (userNotifier_ != nullptr) { userNotifier_->UnRegisterEventType(USER_ACTIVE_EVENT); userNotifier_->UnRegisterEventType(USER_NON_ACTIVE_EVENT); userNotifier_->UnRegisterEventType(USER_ACTIVE_TO_NON_ACTIVE_EVENT);