? test.c ? diff Index: server/citytools.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/server/citytools.c,v retrieving revision 1.165 diff -u -r1.165 citytools.c --- server/citytools.c 2002/02/21 09:44:52 1.165 +++ server/citytools.c 2002/02/21 11:53:08 @@ -1308,8 +1308,6 @@ struct dumb_city *pdcity = map_get_player_tile(x, y, pplayer)->city; struct city *pcity = map_get_city(x, y); - assert(pcity != NULL); - packet->id=pdcity->id; packet->owner=pdcity->owner; packet->x=x; @@ -1320,19 +1318,20 @@ if (map_get_known_and_seen(x, y, pplayer)) { /* Since the tile is visible the player can see the tile, and if it didn't actually have a city pdcity would be NULL */ + assert(pcity != NULL); packet->happy = !city_unhappy(pcity); } else { packet->happy = TRUE; } - if (pcity->id == pdcity->id && city_got_building(pcity, B_PALACE)) + if (pcity && pcity->id == pdcity->id && city_got_building(pcity, B_PALACE)) packet->capital = TRUE; else packet->capital = FALSE; packet->walls = pdcity->has_walls; - if (player_has_traderoute_with_city(pplayer, pcity)) { + if (pcity && player_has_traderoute_with_city(pplayer, pcity)) { packet->tile_trade = pcity->tile_trade; } else { packet->tile_trade = 0;