Fix called C++ object pointer is null

Signed-off-by: Jérôme Duval <[email protected]>
This commit is contained in:
Murai Takashi
2013-07-17 18:26:10 +02:00
committed by Jérôme Duval
parent 7a569c8250
commit 2aa0e54e4f
+3 -1
View File
@@ -116,8 +116,10 @@ Icb::Icb(Volume *volume, long_address address)
"%d, length = %" B_PRIu32 ")\n", volume, address.block(),
address.partition(), address.length()));
if (volume == NULL)
if (volume == NULL) {
fInitStatus = B_BAD_VALUE;
return;
}
off_t block;
status_t status = fVolume->MapBlock(address, &block);