Add exception handling to StepSignature
[platform/core/appfw/app-installers.git] / src / common / step / security / step_signature.cc
index 6c7abdd..3a63882 100644 (file)
@@ -132,6 +132,9 @@ Step::Status StepSignature::process() {
 }
 
 Step::Status StepSignature::undo() {
+  if (signature_ == nullptr)
+    return Step::Status::OK;
+
   bf::remove(signature_->GetFilePath());
   if (bf::exists(signature_->GetBackupPath()))
     bf::rename(signature_->GetBackupPath(), signature_->GetFilePath());