dont fail if script does not define member
This commit is contained in:
parent
507167d5c1
commit
e46c9be79f
@ -53,12 +53,13 @@ void BaseParser::ReadUseRestrictionsSetting()
|
||||
{
|
||||
if (0 != luaL_dostring(lua_state, "return use_turn_restrictions\n"))
|
||||
{
|
||||
throw OSRMException("ERROR occured in scripting block");
|
||||
use_turn_restrictions = false;
|
||||
}
|
||||
if (lua_isboolean(lua_state, -1))
|
||||
else if (lua_isboolean(lua_state, -1))
|
||||
{
|
||||
use_turn_restrictions = lua_toboolean(lua_state, -1);
|
||||
}
|
||||
|
||||
if (use_turn_restrictions)
|
||||
{
|
||||
SimpleLogger().Write() << "Using turn restrictions";
|
||||
|
Loading…
Reference in New Issue
Block a user