Bug #335 ยป 0018-Avoid-announce_trade_route_removal-call-with-a-NULL-.patch
| server/citytools.c | ||
|---|---|---|
|
static bool city_workers_queue_remove(struct city *pcity);
|
||
|
static void announce_trade_route_removal(struct city *pc1, struct city *pc2,
|
||
|
bool source_gone);
|
||
|
bool source_gone)
|
||
|
fc__attribute((nonnull (1, 2)));
|
||
|
/************************************************************************//**
|
||
|
Freeze the workers (citizens on tiles) for the city. They will not be
|
||
| ... | ... | |
|
if (back_route != NULL) {
|
||
|
trade_route_list_remove(pc2->routes, back_route);
|
||
|
}
|
||
|
}
|
||
|
if (announce) {
|
||
|
announce_trade_route_removal(pc1, pc2, source_gone);
|
||
|
if (announce) {
|
||
|
announce_trade_route_removal(pc1, pc2, source_gone);
|
||
|
city_refresh(pc2);
|
||
|
send_city_info(city_owner(pc2), pc2);
|
||
|
city_refresh(pc2);
|
||
|
send_city_info(city_owner(pc2), pc2);
|
||
|
}
|
||
|
}
|
||
|
return back_route;
|
||