aboutsummaryrefslogtreecommitdiff
path: root/engines/kyra/script_lok.cpp
diff options
context:
space:
mode:
authorMatthew Hoops2011-08-26 22:44:17 -0400
committerMatthew Hoops2011-08-26 22:44:17 -0400
commit4a69dc13d92e82fff85dc5a3a923b74ced259ffa (patch)
tree8945cd3745fd65f28b043caf7b1beddbbce2b2a1 /engines/kyra/script_lok.cpp
parentad293b249e74dd1cfbdbd721d02145efbdaf9eca (diff)
parent5e174cbfe466dbbe8e5470b0a00de1481b986181 (diff)
downloadscummvm-rg350-4a69dc13d92e82fff85dc5a3a923b74ced259ffa.tar.gz
scummvm-rg350-4a69dc13d92e82fff85dc5a3a923b74ced259ffa.tar.bz2
scummvm-rg350-4a69dc13d92e82fff85dc5a3a923b74ced259ffa.zip
Merge remote branch 'upstream/master' into pegasus
Diffstat (limited to 'engines/kyra/script_lok.cpp')
-rw-r--r--engines/kyra/script_lok.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/engines/kyra/script_lok.cpp b/engines/kyra/script_lok.cpp
index 2b90d001ca..4d40971124 100644
--- a/engines/kyra/script_lok.cpp
+++ b/engines/kyra/script_lok.cpp
@@ -558,7 +558,10 @@ int KyraEngine_LoK::o1_setCustomPaletteRange(EMCState *script) {
_screen->copyPalette(0, 12);
}
} else {
- _screen->getPalette(1).copy(_specialPalettes[stackPos(0)], 0, stackPos(2), stackPos(1));
+ if (!_specialPalettes[stackPos(0)])
+ warning("KyraEngine_LoK::o1_setCustomPaletteRange(): Trying to use missing special palette %d", stackPos(0));
+ else
+ _screen->getPalette(1).copy(_specialPalettes[stackPos(0)], 0, stackPos(2), stackPos(1));
}
return 0;
}
@@ -1956,4 +1959,3 @@ void KyraEngine_LoK::setupOpcodeTable() {
#undef Opcode
} // End of namespace Kyra
-