Follow-up Comment #5, bug #19467 (project freeciv):

That assert is a bit overzealous. For supporting NULL ptile parameter just one
check has to be added. Otherwise NULL gets passed to underlying functions that
work with it exactly as I were expecting - NULL ptile is a feature. Attached
fix makes get_unittype_bonus() to work with NULL ptile and removes part
checking against it from the assert. I'm a bit undecided if assert should be
removed completely, along with similar asserts from other members of the
function family. Passing such NULL parameters does make sense in some
situations, but maybe it's more robust (or at least gives more consistent
end-user-experience) to avoid them when possible.

(file #15208)
    _______________________________________________________

Additional Item Attachment:

File name: HpLossUnitAssertFix.diff       Size:1 KB


    _______________________________________________________

Reply to this item at:

  <http://gna.org/bugs/?19467>

_______________________________________________
  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