X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Flibr2c2%2Froute.cpp;h=5ee30e033161030fa31a8f558f50e7f4a3b9aaea;hb=f86223ef906cad5c492c95d069550f262f5b3dff;hp=be4237d10bddb875f84d172a0a7f98cb1c3b8a55;hpb=02453a447bad0ecc2a71e00b9578c9afaee0eadb;p=r2c2.git diff --git a/source/libr2c2/route.cpp b/source/libr2c2/route.cpp index be4237d..5ee30e0 100644 --- a/source/libr2c2/route.cpp +++ b/source/libr2c2/route.cpp @@ -218,7 +218,7 @@ unsigned Route::get_path(Track &trk) const if(trk.get_type().is_turnout()) { map::const_iterator i = turnouts.find(trk.get_turnout_address()); - if(i!=turnouts.end()) + if(i!=turnouts.end() && i->second>=0) return i->second; } return trk.get_active_path();