Skip to content

NRE in Pawn_HealthTracker_HealthTick.TryHealRandomInjury #48

@NoirFry

Description

@NoirFry

NRE here:

...
if (pawn.IsHashIntervalTick(50) && !pawn.IsHashIntervalTick(100) && !pawn.Position.Fogged(pawn.Map))
...

as pawn.Map can be null when mechaniod is healing and is in a caravan.

I added null check like that:

if (pawn.IsHashIntervalTick(50) && !pawn.IsHashIntervalTick(100) && pawn.Map != null && !pawn.Position.Fogged(pawn.Map))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions