Bug #2459 ยป 0001-common-Do-not-dereference-a-missing-goods-type-in-ac.patch
| common/actres.c | ||
|---|---|---|
|
if (result == ACTRES_TRADE_ROUTE) {
|
||
|
struct goods_type *pgood = unit_current_goods(actor->unit, homecity);
|
||
|
if (!can_establish_trade_route(homecity, target->city,
|
||
|
pgood->replace_priority)) {
|
||
|
if (pgood == nullptr
|
||
|
|| !can_establish_trade_route(homecity, target->city,
|
||
|
pgood->replace_priority)) {
|
||
|
return TRI_NO;
|
||
|
}
|
||
|
}
|
||