acemod / ACE-Anvil

Open-source realism mod for Arma Reforger
https://anvil.acemod.org
GNU General Public License v2.0
22 stars 7 forks source link

Medical - `item` in `ApplyEffect` requires a check for `null` #60

Closed Kexanone closed 4 days ago

Kexanone commented 2 weeks ago
10:56:57.875  SCRIPT    (E): Virtual Machine Exception

Reason: NULL pointer to instance. Variable 'item'

Class:      'ACE_Medical_ConsumableMorphine'
Function: 'ApplyEffect'
Stack trace:
scripts/Game/Components/Gadgets/SCR_ConsumableEffectHealthItems.c:40 Function ApplyEffect
scripts/Game/ACE_Medical/Components/Gadgets/ACE_Medical_ConsumableMorphine.c:17 Function ApplyEffect
scripts/Game/Components/Gadgets/SCR_ConsumableItemComponent.c:36 Function ApplyItemEffect
scripts/Game/Components/Gadgets/SCR_ConsumableItemComponent.c:87 Function OnApplyToCharacter
scripts/Game/Character/SCR_CharacterControllerComponent.c:178 Function OnItemUseEnded
Kexanone commented 4 days ago

Actually, seems to be a vanilla error, since it can also happen to saline bags and it's actually SCR_ConsumableEffectHealthItems that throws the exception.