DiskProbe: Check we actually have a buffer before computing the offset.

Fixes #17709.
This commit is contained in:
Augustin Cavalier 2022-04-25 19:16:28 -04:00
parent 925b83a85a
commit acdd772db0

View File

@ -1062,8 +1062,10 @@ DataEditor::GetViewBuffer(const uint8 **_buffer)
debugger("DataEditor: view not locked");
status_t status = UpdateIfNeeded();
if (status < B_OK)
if (status != B_OK)
return status;
if (fView == NULL)
return B_NO_INIT;
*_buffer = fView + fViewOffset - fRealViewOffset;
return B_OK;