aboutsummaryrefslogtreecommitdiff
path: root/engines/hdb
diff options
context:
space:
mode:
authorNipun Garg2019-06-21 06:46:51 +0530
committerEugene Sandulenko2019-09-03 17:16:53 +0200
commit1cae287783814cbfa4b11b4f1fecdd3b7b566c39 (patch)
treef50f6e11ce4bc8393fff4119540c7eaac81d982b /engines/hdb
parentfd8ad8e3da8e14d3e52504f2041e55f38cdc0985 (diff)
downloadscummvm-rg350-1cae287783814cbfa4b11b4f1fecdd3b7b566c39.tar.gz
scummvm-rg350-1cae287783814cbfa4b11b4f1fecdd3b7b566c39.tar.bz2
scummvm-rg350-1cae287783814cbfa4b11b4f1fecdd3b7b566c39.zip
HDB: Modify getTileIndex to accept NULL input
Diffstat (limited to 'engines/hdb')
-rw-r--r--engines/hdb/draw-manager.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/engines/hdb/draw-manager.cpp b/engines/hdb/draw-manager.cpp
index b59b86f5df..afc6b43dcc 100644
--- a/engines/hdb/draw-manager.cpp
+++ b/engines/hdb/draw-manager.cpp
@@ -154,6 +154,9 @@ Tile *DrawMan::getTile(int index) {
}
int DrawMan::getTileIndex(const char *name) {
+ if (!name) {
+ return -1;
+ }
for (int i = 0; i < _numTiles; i++) {
if (Common::matchString(_tLookupArray[i].filename, name)) {
return i;