Avoid crashing in TrackSector if findOutOfRoadSector failed

This commit is contained in:
Benau 2019-07-08 10:18:50 +08:00
parent 400c1e5347
commit 6cab3b07c9

View File

@ -757,9 +757,10 @@ int Graph::findOutOfRoadSector(const Vec3& xyz, const int curr_sector,
if(min_sector==UNKNOWN_SECTOR)
{
Log::info("Graph", "unknown sector found.");
Log::warn("Graph", "unknown sector found.");
}
return min_sector;
// Avoid crashing in TrackSector
return 0;
} // findOutOfRoadSector
//-----------------------------------------------------------------------------