mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-14 00:20:38 +00:00
- fixed crash in AutoUseStrifeHealth
The loop never checked if the item was still valid and would continue to try to use it, even after it was removed from the inventory and destroyed. As native code this just failed silently, but with the VM it needs to be explicitly checked.
This commit is contained in:
parent
3f8d565dbb
commit
0b2a919bbe
1 changed files with 2 additions and 1 deletions
|
@ -309,7 +309,8 @@ extend class PlayerPawn
|
||||||
|
|
||||||
while (player.health < 50)
|
while (player.health < 50)
|
||||||
{
|
{
|
||||||
if (!UseInventory (Items[index]))
|
let item = Items[index];
|
||||||
|
if (item == null || !UseInventory (item))
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (player.health >= 50) return;
|
if (player.health >= 50) return;
|
||||||
|
|
Loading…
Reference in a new issue