libsnapshot: Fix typo in nullptr check

We already know 'existing_extent' is non-null (or else we would
have crashed on the previous line).  We fix this to check
'existing_linear_extent' against nullptr.

Test: TreeHugger
Change-Id: I03338bca87d1c2bd0cbea0e1ec31244ba9570a40
This commit is contained in:
Greg Kaiser 2019-09-13 06:58:03 -07:00
parent 6f735df0d1
commit 99ab97836b
1 changed files with 1 additions and 1 deletions

View File

@ -41,7 +41,7 @@ static std::unique_ptr<Extent> Intersect(Extent* target_extent, Extent* existing
// Convert target_extent and existing_extent to linear extents. Zero extents
// doesn't matter and doesn't result in any intersection.
auto existing_linear_extent = existing_extent->AsLinearExtent();
if (!existing_extent) return nullptr;
if (!existing_linear_extent) return nullptr;
auto target_linear_extent = target_extent->AsLinearExtent();
if (!target_linear_extent) return nullptr;