diff --git a/fs_mgr/libsnapshot/snapshot_writer.cpp b/fs_mgr/libsnapshot/snapshot_writer.cpp index 6aad3d108..82a7fd7d6 100644 --- a/fs_mgr/libsnapshot/snapshot_writer.cpp +++ b/fs_mgr/libsnapshot/snapshot_writer.cpp @@ -93,6 +93,9 @@ bool CompressedSnapshotWriter::VerifyMergeOps() const noexcept { std::unique_ptr CompressedSnapshotWriter::OpenReader() { auto cow = OpenCowReader(); + if (cow == nullptr) { + return nullptr; + } auto reader = std::make_unique(); if (!reader->SetCow(std::move(cow))) {