aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/star_control
diff options
context:
space:
mode:
authorPaul Gilbert2017-07-29 21:39:51 -0400
committerPaul Gilbert2017-07-29 21:39:51 -0400
commit2c6b2532dd19d0ff268dc1c099f4bf18e86a42da (patch)
treee25420d10e6650fbef2d72a04c46b138a5a8823b /engines/titanic/star_control
parent40818ac86ba253168876d01b4350cebd969d6c2f (diff)
downloadscummvm-rg350-2c6b2532dd19d0ff268dc1c099f4bf18e86a42da.tar.gz
scummvm-rg350-2c6b2532dd19d0ff268dc1c099f4bf18e86a42da.tar.bz2
scummvm-rg350-2c6b2532dd19d0ff268dc1c099f4bf18e86a42da.zip
TITANIC: Fix Satrfield crash using Tab without having inserted photo
Diffstat (limited to 'engines/titanic/star_control')
-rw-r--r--engines/titanic/star_control/star_view.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/engines/titanic/star_control/star_view.cpp b/engines/titanic/star_control/star_view.cpp
index 0caa4425af..e02152de6b 100644
--- a/engines/titanic/star_control/star_view.cpp
+++ b/engines/titanic/star_control/star_view.cpp
@@ -334,6 +334,9 @@ void CStarView::fn9() {
}
void CStarView::toggleMode() {
+ if (!_photoSurface)
+ return;
+
_showingPhoto = !_showingPhoto;
if (_starField)
_starField->setMode(_showingPhoto ? MODE_PHOTO : MODE_STARFIELD);