Fix segmentation fault when "hsgrdata" unset
This commit is contained in:
parent
b404c79ca4
commit
a8642bd208
@ -80,16 +80,7 @@ inline void populate_base_path(ServerPaths &server_paths)
|
|||||||
if (path_iterator == server_paths.end() ||
|
if (path_iterator == server_paths.end() ||
|
||||||
!boost::filesystem::is_regular_file(path_iterator->second))
|
!boost::filesystem::is_regular_file(path_iterator->second))
|
||||||
{
|
{
|
||||||
if (path_iterator == server_paths.end())
|
throw osrm::exception(".hsgr not found");
|
||||||
{
|
|
||||||
SimpleLogger().Write() << "hsgrdata unset";
|
|
||||||
}
|
|
||||||
if (!boost::filesystem::is_regular_file(path_iterator->second))
|
|
||||||
{
|
|
||||||
SimpleLogger().Write() << "not a regular file";
|
|
||||||
}
|
|
||||||
|
|
||||||
throw osrm::exception(".hsgr not found: " + path_iterator->second.string());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
path_iterator = server_paths.find("nodesdata");
|
path_iterator = server_paths.find("nodesdata");
|
||||||
|
Loading…
Reference in New Issue
Block a user