Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9d1460be authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Fix nullptr access when cow reader open fails" am: 9e6005ad

parents 69525ba3 9e6005ad
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -93,6 +93,9 @@ bool CompressedSnapshotWriter::VerifyMergeOps() const noexcept {

std::unique_ptr<FileDescriptor> CompressedSnapshotWriter::OpenReader() {
    auto cow = OpenCowReader();
    if (cow == nullptr) {
        return nullptr;
    }

    auto reader = std::make_unique<CompressedSnapshotReader>();
    if (!reader->SetCow(std::move(cow))) {