aboutsummaryrefslogtreecommitdiff
path: root/engines/mohawk/bitmap.cpp
diff options
context:
space:
mode:
authorMatthew Hoops2012-09-12 20:18:13 -0400
committerMatthew Hoops2012-09-12 20:18:13 -0400
commitd5ed8b1901b88e361a2a420a9daf586f6089a36b (patch)
treed19e4dd7baf33b7447d69d8ad8d3c25732a69698 /engines/mohawk/bitmap.cpp
parentff51a7661d7a2cb296b987edfc3d81727160e627 (diff)
parent8808393b3a3428df2946d7967e52aba084c8ffe5 (diff)
downloadscummvm-rg350-d5ed8b1901b88e361a2a420a9daf586f6089a36b.tar.gz
scummvm-rg350-d5ed8b1901b88e361a2a420a9daf586f6089a36b.tar.bz2
scummvm-rg350-d5ed8b1901b88e361a2a420a9daf586f6089a36b.zip
Merge remote branch 'upstream/master' into pegasus
Conflicts: AUTHORS
Diffstat (limited to 'engines/mohawk/bitmap.cpp')
-rw-r--r--engines/mohawk/bitmap.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/engines/mohawk/bitmap.cpp b/engines/mohawk/bitmap.cpp
index 952b6daec2..bc19fe2d3e 100644
--- a/engines/mohawk/bitmap.cpp
+++ b/engines/mohawk/bitmap.cpp
@@ -630,7 +630,7 @@ void MohawkBitmap::drawRLE8(Graphics::Surface *surface, bool isLE) {
// Myst Bitmap Decoder
//////////////////////////////////////////
-MohawkSurface *MystBitmap::decodeImage(Common::SeekableReadStream* stream) {
+MohawkSurface *MystBitmap::decodeImage(Common::SeekableReadStream *stream) {
uint32 uncompressedSize = stream->readUint32LE();
Common::SeekableReadStream *bmpStream = decompressLZ(stream, uncompressedSize);
delete stream;
@@ -652,10 +652,10 @@ MohawkSurface *MystBitmap::decodeImage(Common::SeekableReadStream* stream) {
}
// Copy the palette to one of our own
- const byte *palette = bitmapDecoder.getPalette();
byte *newPal = 0;
- if (palette) {
+ if (bitmapDecoder.hasPalette()) {
+ const byte *palette = bitmapDecoder.getPalette();
newPal = (byte *)malloc(256 * 3);
memcpy(newPal, palette, 256 * 3);
}