commit | 6c0570668f1cadee582bc93b39155c85e60f6fa4 | [log] [tgz] |
---|---|---|
author | Kelvin Zhang <zhangkelvin@google.com> | Tue Jan 17 15:47:31 2023 -0800 |
committer | Treehugger Robot <treehugger-gerrit@google.com> | Wed Jan 18 02:25:00 2023 +0000 |
tree | f2b5a0ed023d7c1435638356517c6ef62c219411 | |
parent | 3efb3f2a55d6b03fda872a9cb05ee6b1ebd0f509 [diff] [blame] |
Fix crashes when OTA install fails on non-VABC partition Test: th Bug: 265759781 Change-Id: Iaca86602113fa4de16a23df777dec90300a088c7
diff --git a/payload_consumer/partition_writer.cc b/payload_consumer/partition_writer.cc index 3432c89..d7d8bea 100644 --- a/payload_consumer/partition_writer.cc +++ b/payload_consumer/partition_writer.cc
@@ -288,7 +288,9 @@ } void PartitionWriter::CheckpointUpdateProgress(size_t next_op_index) { - target_fd_->Flush(); + if (target_fd_) { + target_fd_->Flush(); + } } std::unique_ptr<ExtentWriter> PartitionWriter::CreateBaseExtentWriter() {