Commit b9915d9b authored by Connor's avatar Connor Committed by yiwu-arbug

check nullptr (#91)

tiny fix
Signed-off-by: 's avatarConnor1996 <zbk602423539@gmail.com>
parent 280b59d6
...@@ -84,9 +84,9 @@ std::unique_ptr<BlobGC> BasicBlobGCPicker::PickBlobGC( ...@@ -84,9 +84,9 @@ std::unique_ptr<BlobGC> BasicBlobGCPicker::PickBlobGC(
} }
bool BasicBlobGCPicker::CheckBlobFile(BlobFileMeta* blob_file) const { bool BasicBlobGCPicker::CheckBlobFile(BlobFileMeta* blob_file) const {
assert(blob_file != nullptr && assert(blob_file == nullptr ||
blob_file->file_state() != BlobFileMeta::FileState::kInit); blob_file->file_state() != BlobFileMeta::FileState::kInit);
if (blob_file != nullptr && if (blob_file == nullptr ||
blob_file->file_state() != BlobFileMeta::FileState::kNormal) blob_file->file_state() != BlobFileMeta::FileState::kNormal)
return false; return false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment