diff options
author | Walter van Niftrik | 2016-04-03 09:18:04 +0200 |
---|---|---|
committer | Walter van Niftrik | 2016-06-06 20:35:49 +0200 |
commit | d6f34eda997ef5ace7078ac6d944ac505bb2a35d (patch) | |
tree | b7f49104f7dd64dcf56b9d797899bb39cef394b8 /engines/adl/hires2.cpp | |
parent | 1b9d712a8b68f75dcd7c22021b50fff1eeaec155 (diff) | |
download | scummvm-rg350-d6f34eda997ef5ace7078ac6d944ac505bb2a35d.tar.gz scummvm-rg350-d6f34eda997ef5ace7078ac6d944ac505bb2a35d.tar.bz2 scummvm-rg350-d6f34eda997ef5ace7078ac6d944ac505bb2a35d.zip |
ADL: Remove DataBlockPtr::isValid()
Diffstat (limited to 'engines/adl/hires2.cpp')
-rw-r--r-- | engines/adl/hires2.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/engines/adl/hires2.cpp b/engines/adl/hires2.cpp index 4ac8e88fa0..70b98b9a06 100644 --- a/engines/adl/hires2.cpp +++ b/engines/adl/hires2.cpp @@ -42,6 +42,9 @@ DataBlockPtr HiRes2Engine::readDataBlockPtr(Common::ReadStream &f) const { if (f.eos() || f.err()) error("Error reading DataBlockPtr"); + if (track == 0 && sector == 0 && offset == 0 && size == 0) + return DataBlockPtr(); + return _disk.getDataBlock(track, sector, offset, size); } @@ -70,7 +73,7 @@ void HiRes2Engine::init() { for (uint i = 0; i < IDI_HR2_NUM_MESSAGES; ++i) { DataBlockPtr str(readDataBlockPtr(*stream)); - if (str->isValid()) { + if (str) { StreamPtr strStream(str->createReadStream()); _messages.push_back(readString(*strStream, 0xff)); } else { |