Skip to content

Commit

Permalink
DM: Fix errors in DisplayMan::isDerivedBitmapInCache
Browse files Browse the repository at this point in the history
  • Loading branch information
Bendegúz Nagy committed Aug 26, 2016
1 parent 579b56d commit e95470d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions engines/dm/gfx.cpp
Expand Up @@ -2894,8 +2894,9 @@ uint16 DisplayMan::getHorizontalOffsetM22(uint16 val) {
}

bool DisplayMan::isDerivedBitmapInCache(int16 derivedBitmapIndex) {
if (_derivedBitmaps == nullptr) {
_derivedBitmaps[derivedBitmapIndex] = new byte[_derivedBitmapByteCount[derivedBitmapIndex]];
if (_derivedBitmaps[derivedBitmapIndex] == nullptr) {
// * 2, because the original uses 4 bits instead of 8 bits to store a pixel
_derivedBitmaps[derivedBitmapIndex] = new byte[_derivedBitmapByteCount[derivedBitmapIndex] * 2];
return false;
} else
return true;
Expand Down

0 comments on commit e95470d

Please sign in to comment.