修改指针判空顺序

Signed-off-by: rsin <renxin20@h-partners.com>
This commit is contained in:
rsin 2024-09-16 10:10:09 +08:00
parent 8243cc07df
commit 410f2df6b5

View File

@ -1098,7 +1098,7 @@ void SimManager::RegisterCoreNotify(int32_t slotId, const std::shared_ptr<AppExe
simStateManager_[slotId]->RegisterCoreNotify(handler, what);
} else if (what == RadioEvent::RADIO_SIM_ACCOUNT_LOADED) {
// IsVSimSlotId is used for the callback function can be registered in the VSIM card.
if ((!IsValidSlotId(slotId) && !multiSimMonitor_->IsVSimSlotId(slotId)) || (multiSimMonitor_ == nullptr)) {
if ((multiSimMonitor_ == nullptr) || (!IsValidSlotId(slotId) && !multiSimMonitor_->IsVSimSlotId(slotId))) {
TELEPHONY_LOGE("slotId is invalid or multiSimMonitor_ is nullptr !");
return;
}