[BUG] (Alpha 10f) Alert_Starvation throws null reference on no Need_Food

Started by mipen, May 04, 2015, 04:54:46 AM

Previous topic - Next topic

mipen

Problem:
Setting the diet tag in raceprops to NeverEats for a pawn which becomes a colonist causes a null reference exception.

How to replicate:
Change the diet of the HumanLike pawn racedef to NeverEats and start a new game

Proposed solution:
Add null checks to Alert_Starvation

Tynan

Thanks, fixed.

For the short term you can use reflection to pull it out of AlertsReadout.AllAlerts (I think).
Tynan Sylvester - @TynanSylvester - Tynan's Blog