From 1cae287783814cbfa4b11b4f1fecdd3b7b566c39 Mon Sep 17 00:00:00 2001 From: Nipun Garg Date: Fri, 21 Jun 2019 06:46:51 +0530 Subject: HDB: Modify getTileIndex to accept NULL input --- engines/hdb/draw-manager.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'engines/hdb') 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; -- cgit v1.2.3