mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-23 04:33:09 +00:00
MADS: Check 'dialog' earlier to avoid untested null dereference
This commit is contained in:
parent
07f82d0b38
commit
60443e49e8
@ -171,12 +171,12 @@ bool DialogsNebular::show(int messageId, int objectId) {
|
||||
crFlag = false;
|
||||
}
|
||||
|
||||
if (!centerFlag)
|
||||
dialog->incNumLines();
|
||||
|
||||
if (!dialog)
|
||||
error("DialogsNebular::show - Uninitialized dialog");
|
||||
|
||||
if (!centerFlag)
|
||||
dialog->incNumLines();
|
||||
|
||||
// Show the dialog
|
||||
_vm->_events->setCursor(CURSOR_ARROW);
|
||||
dialog->show();
|
||||
|
Loading…
x
Reference in New Issue
Block a user