XEEN: Fix crash setting up combat speed table for new games

This commit is contained in:
Paul Gilbert 2018-03-17 07:12:01 -04:00
parent 637dedeb9a
commit 902c984cf5
2 changed files with 2 additions and 2 deletions

View File

@ -1116,7 +1116,7 @@ void Combat::setSpeedTable() {
}
if (hasSpeed) {
if (_speedTable[_whosSpeed] != oldSpeed) {
if (_whosSpeed >= (int)_speedTable.size() || _speedTable[_whosSpeed] != oldSpeed) {
for (_whosSpeed = 0; _whosSpeed < (int)charSpeeds.size(); ++_whosSpeed) {
if (oldSpeed == _speedTable[_whosSpeed])
break;

View File

@ -267,7 +267,7 @@ void Interface::perform() {
_buttonValue = 0;
do {
events.pollEventsAndWait();
if (party._partyDead)
if (g_vm->shouldExit() || party._partyDead)
return;
if (events._leftButton && WAIT_BOUNDS.contains(events._mousePos))