[Scummvm-git-logs] scummvm master -> 91732239991918b25633cd07d6c5ae834e599115
digitall
dgturner at iee.org
Thu Oct 18 23:18:40 CEST 2018
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
9173223999 SCI: Fix Segfault When Using Console "show_map" Command on SCI32 games.
Commit: 91732239991918b25633cd07d6c5ae834e599115
https://github.com/scummvm/scummvm/commit/91732239991918b25633cd07d6c5ae834e599115
Author: D G Turner (digitall at scummvm.org)
Date: 2018-10-18T22:25:21+01:00
Commit Message:
SCI: Fix Segfault When Using Console "show_map" Command on SCI32 games.
The _gfxScreen instance is nullptr for SCI32 games, thus this console
command previously caused a segfault.
Changed paths:
engines/sci/console.cpp
diff --git a/engines/sci/console.cpp b/engines/sci/console.cpp
index 371ed7f..91c5d01 100644
--- a/engines/sci/console.cpp
+++ b/engines/sci/console.cpp
@@ -2568,6 +2568,13 @@ bool Console::cmdShowMap(int argc, const char **argv) {
return true;
}
+#ifdef ENABLE_SCI32
+ if (getSciVersion() >= SCI_VERSION_2) {
+ debugPrintf("Command not available / implemented for SCI32 games.\n");
+ return true;
+ }
+#endif
+
int map = atoi(argv[1]);
switch (map) {
@@ -2575,7 +2582,9 @@ bool Console::cmdShowMap(int argc, const char **argv) {
case 1:
case 2:
case 3:
- _engine->_gfxScreen->debugShowMap(map);
+ if (_engine->_gfxScreen) {
+ _engine->_gfxScreen->debugShowMap(map);
+ }
break;
default:
More information about the Scummvm-git-logs
mailing list