string route_name(const Route *const &route)
{
- return route->get_name();
+ return route ? route->get_name() : "(none)";
}
RouterPanel::RouterPanel(Engineer &e, Train &t):
dynamic_cast<GLtk::Button *>(get_item(widgets, "btn_goto"))->signal_clicked.connect(sigc::mem_fun(this, &RouterPanel::goto_clicked));
+ routes.append(0);
const set<Route *> &lroutes = train.get_layout().get_all<Route>();
for(set<Route *>::const_iterator i=lroutes.begin(); i!=lroutes.end(); ++i)
- routes.append(*i);
+ if(!(*i)->is_temporary())
+ routes.append(*i);
TrainRouter *router = train.get_ai_of_type<TrainRouter>();
if(!router)