item::gun_range dereferences null pointer #32298
Labels
<Crash / Freeze>
Fatal bug that results in hangs or crashes.
Items: Gunmod / Toolmod
Weapon and tool attachments, and add-ons
(S2 - Confirmed)
Bug that's been confirmed to exist
Describe the bug
The game crashes when
item::gun_range
tries to dereference a null pointer. When that method is called from an object that contains no ammo items and has a gunmod that definesammo_modifier
it will end up trying to dereference theammo
islot of the null item.Steps To Reproduce
Expected behavior
Normal inventory function without crashes.
Versions and configuration
Additional context
The text was updated successfully, but these errors were encountered: