Skip to content

Bug: Units::getFocusPenalty crashes on soulless units #5798

@quietust

Description

@quietust

The function Units::getFocusPenalty dereferences unit->status.current_soul without verifying that it is non-null; as such, if you call it on a unit which has no soul (which seems to include certain types of undead), the game will crash.

It seems this can happen if such a creature becomes a member of your fortress and you have idle-crafting enabled.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions