Skip to content

Commit

Permalink
check nullptr (tikv#91)
Browse files Browse the repository at this point in the history
tiny fix

Signed-off-by: Connor1996 <zbk602423539@gmail.com>
  • Loading branch information
Connor1996 committed Oct 8, 2019
1 parent ab0743c commit 18a53b8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/blob_gc_picker.cc
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,9 @@ std::unique_ptr<BlobGC> BasicBlobGCPicker::PickBlobGC(
}

bool BasicBlobGCPicker::CheckBlobFile(BlobFileMeta* blob_file) const {
assert(blob_file != nullptr &&
assert(blob_file == nullptr ||
blob_file->file_state() != BlobFileMeta::FileState::kInit);
if (blob_file != nullptr &&
if (blob_file == nullptr ||
blob_file->file_state() != BlobFileMeta::FileState::kNormal)
return false;

Expand Down

0 comments on commit 18a53b8

Please sign in to comment.