diff --git a/engines/tony/mpal/mpal.cpp b/engines/tony/mpal/mpal.cpp index 1a24c5a5760..1de5c6850c7 100644 --- a/engines/tony/mpal/mpal.cpp +++ b/engines/tony/mpal/mpal.cpp @@ -521,14 +521,15 @@ static LpItem getItemData(uint32 nOrdItem) { dat += dim; } - // Check if we've got to the end of the file int i = READ_LE_UINT16(dat); - if (i != 0xABCD) - return NULL; globalUnlock(hDat); globalFree(hDat); + // Check if we've got to the end of the file + if (i != 0xABCD) + return NULL; + return ret; }