mirror of
https://github.com/openharmony/ability_ability_runtime.git
synced 2026-08-24 22:21:36 -04:00
protect nullptr
Signed-off-by: laoyitong <laoyitong@huawei.com> Change-Id: I08b784a4bc61818ee45fee1e2bb538d309ea49b7
This commit is contained in:
@@ -323,6 +323,10 @@ bool MissionInfoMgr::UpdateMissionSnapshot(int32_t missionId, const sptr<IRemote
|
||||
HILOG_ERROR("snapshot: get mission failed, missionId %{public}d not exists", missionId);
|
||||
return false;
|
||||
}
|
||||
if (!snapshotHandler_) {
|
||||
HILOG_ERROR("snapshot: snapshotHandler_ is nullptr");
|
||||
return false;
|
||||
}
|
||||
Snapshot snapshot;
|
||||
int32_t result = snapshotHandler_->GetSnapshot(abilityToken, snapshot);
|
||||
if (result != 0) {
|
||||
|
||||
Reference in New Issue
Block a user