Fix called C++ object pointer is null

Signed-off-by: Jérôme Duval <jerome.duval@gmail.com>
This commit is contained in:
Murai Takashi 2013-07-17 19:39:14 +09:00 committed by Jérôme Duval
parent 7a569c8250
commit 2aa0e54e4f

View File

@ -116,8 +116,10 @@ Icb::Icb(Volume *volume, long_address address)
"%d, length = %" B_PRIu32 ")\n", volume, address.block(), "%d, length = %" B_PRIu32 ")\n", volume, address.block(),
address.partition(), address.length())); address.partition(), address.length()));
if (volume == NULL) if (volume == NULL) {
fInitStatus = B_BAD_VALUE; fInitStatus = B_BAD_VALUE;
return;
}
off_t block; off_t block;
status_t status = fVolume->MapBlock(address, &block); status_t status = fVolume->MapBlock(address, &block);