Follow-up Comment #3, patch #3885 (project freeciv):

Indeed, looking through the call stack, the couple places where it is called
without a check that pcity != NULL happen to be in city iterations, where it
is safe to assume pcity isn't null (or the iterator is broken, which is a
larger issue).  In that case, we probably don't need to check for pcity for
the ground units either, but there's no reason to fix that here: that can be
part of the fix for is_ground_unit(), and the inline FIXME.

Given this consideration, AssessBadCityDefense.patch (file 17845) is a
perfectly good solution for this issue: the ways in which it might be
incomplete are irrelevant and/or likely to be fixed in another nativity pass
over base_assess_defense_unit() anyway.

    _______________________________________________________

Reply to this item at:

  <http://gna.org/patch/?3885>

_______________________________________________
  Message sent via/by Gna!
  http://gna.org/


_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to