diff --git simtool.cc simtool.cc index c109518cc..3aefc36d8 100644 --- simtool.cc +++ simtool.cc @@ -535,10 +535,17 @@ DBG_MESSAGE("tool_remover()", "removing roadsign at (%s)", pos.get_str()); if( weg==NULL && rs->get_desc()->get_wtyp()==tram_wt ) { weg = gr->get_weg(track_wt); } + rs->cleanup(player); delete rs; - assert( weg ); - weg->count_sign(); + + // no need to update way if there is none + // may happen when public player builds a signal on a company track, + // the company goes bankrupt and the public player tries to remove the signal + if (weg) { + weg->count_sign(); + } + return true; } @@ -2194,7 +2201,7 @@ const char *tool_plant_tree_t::work( player_t *player, koord3d pos ) return NULL; } } - + return ""; } return NULL; @@ -2954,7 +2961,7 @@ const char *tool_build_tunnel_t::check_pos( player_t *player, koord3d pos) if( sl == slope_t::flat || !slope_t::is_way( sl ) ) { // cannot start a tunnel here, wrong slope return ""; - } + } if( env_t::pak_height_conversion_factor != slope_t::max_diff(sl) ) { win_set_static_tooltip( translator::translate("The gradient does not fit a tunnel") ); diff --git simutrans/history.txt simutrans/history.txt index f6716dc72..4c3f0f013 100644 --- simutrans/history.txt +++ simutrans/history.txt @@ -35,6 +35,7 @@ CHG: maintenance of powerline tunnel/underground transformer maintenance is now maintenance of powerline + that of tunnel ADD: reservation overlay now also shows single way directions and signal states (inspired from ranran) CHG: absolute departure time can be also more than once per month (repeats the time in equal intervals) + FIX: Crash when removing signal without a track underneath Release of 122.0 (r9274 on 10-Oct-2020):