mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-02 23:49:40 +00:00
MYST3: Fix a theorical null pointer dereference
This commit is contained in:
parent
0686251dd2
commit
81a5be7a2d
@ -154,6 +154,9 @@ Dialog::Dialog(Myst3Engine *vm, uint id):
|
||||
const DirectorySubEntry *movieDesc = _vm->getFileDescription("DLOG", id, 0, DirectorySubEntry::kDialogMovie);
|
||||
const DirectorySubEntry *countDesc = _vm->getFileDescription("DLGI", id, 0, DirectorySubEntry::kNumMetadata);
|
||||
|
||||
if (!buttonsDesc || !movieDesc || !countDesc)
|
||||
error("Unable to load dialog %d", id);
|
||||
|
||||
// Retrieve button count
|
||||
_buttonCount = countDesc->getMiscData(0);
|
||||
assert(_buttonCount <= 3);
|
||||
|
Loading…
Reference in New Issue
Block a user