Files
Aurora.3/code/modules/mob
sentry[bot] 5904a54288 Fix null.update move icon() in handle_stamina (#22558)
* Please describe the intent of your changes in a clear fashion.
This PR fixes a runtime error: "Cannot execute null.update move icon().:
proc name: handle stamina".

The root cause was identified as a missing null check for
`hud_used.move_intent` within the `handle_stamina` proc in
`code/modules/mob/living/carbon/human/life.dm`.

Specifically, at line 1598, the condition `if (client)` was
insufficient. While a client might be present, the `hud_used` object or
its `move_intent` property could be null during certain states (e.g.,
HUD initialization or teardown).

The fix involves adding `&& hud_used && hud_used.move_intent` to the
`if` condition, ensuring that `update_move_icon()` is only called when
`hud_used.move_intent` is a valid object. This aligns with defensive
programming patterns used elsewhere in the codebase for similar HUD
element access.

* Please make sure that, in the case of mapping changes, you include
images of these changes in the PR's description.
(No mapping changes in this PR)

* Please make sure to mark your PR as wip or review required by making a
comment with !wip or !review required

* If you include sprites/sounds/... (assets) that you have not created
yourself specify the license and original author below.
* Ensure that you also credit them in the appropriate location /
changelog as specified in the contributor guidelines

### Asset Licenses
The following assets that **have not** been created by myself are
included in this PR:

| Path | Original Author | License |
| --- | --- | --- |
| icons/example.dmi | ExamplePerson (Example Station) | CC0 |
(No new assets are included in this PR)

Fixes SERVER-PROD-GK

---------

Co-authored-by: sentry[bot] <39604003+sentry[bot]@users.noreply.github.com>
Co-authored-by: VMSolidus <evilexecutive@gmail.com>
2026-06-01 15:05:25 +00:00
..
2026-06-01 10:36:04 +00:00
2026-05-27 15:38:57 +00:00