aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorEugene Sandulenko2019-07-03 19:51:22 +0200
committerEugene Sandulenko2019-09-03 17:17:10 +0200
commitf35b63bc1351278dc5950f8867b0bcb997453fb6 (patch)
treed612e132b879c179ef9ec63bde8236f48397ba81 /engines
parente319b120da08328b463f0d458875708705b19589 (diff)
downloadscummvm-rg350-f35b63bc1351278dc5950f8867b0bcb997453fb6.tar.gz
scummvm-rg350-f35b63bc1351278dc5950f8867b0bcb997453fb6.tar.bz2
scummvm-rg350-f35b63bc1351278dc5950f8867b0bcb997453fb6.zip
HDB: Prevent crash when _skyClounds is empty.
Happens in MAP29
Diffstat (limited to 'engines')
-rw-r--r--engines/hdb/gfx.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/engines/hdb/gfx.cpp b/engines/hdb/gfx.cpp
index bf9c43e8af..a17eab6f03 100644
--- a/engines/hdb/gfx.cpp
+++ b/engines/hdb/gfx.cpp
@@ -455,7 +455,8 @@ void Gfx::drawSky() {
static int offset = 0, wait = 0;
for (int j = -64; j < kScreenHeight; j += 64) {
for (int i = -64; i < kScreenWidth; i += 64) {
- _skyClouds->draw(i + offset, j + offset);
+ if (_skyClouds)
+ _skyClouds->draw(i + offset, j + offset);
}
}
wait--;