From ff34ab43800709c1ac5059090d326761c3e47dba Mon Sep 17 00:00:00 2001 From: ilho kim Date: Mon, 2 Jan 2023 15:40:14 +0900 Subject: [PATCH] Fix crash occured during ReinstallSteps ReinstallSteps don't have recovery file Change-Id: I419fd984b62fd16e7195b7b785dcdccee26ae1be Signed-off-by: ilho kim --- src/common/step/security/step_update_security.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/common/step/security/step_update_security.cc b/src/common/step/security/step_update_security.cc index 7d17db2..0903017 100644 --- a/src/common/step/security/step_update_security.cc +++ b/src/common/step/security/step_update_security.cc @@ -61,6 +61,9 @@ Step::Status StepUpdateSecurity::undo() { void StepUpdateSecurity::AddRecoveryInfo() { recovery::RecoveryFile* recovery_file = context_->recovery_info.get().recovery_file.get(); + if (!recovery_file) + return; + recovery_file->set_security_operation_done(true); recovery_file->WriteAndCommitFileContent(); } -- 2.7.4