Fix leak and another negative-size-param issue in scripting_environment_lua.cpp
This commit is contained in:
parent
544d5d8077
commit
73b8b07d42
@ -100,7 +100,11 @@ void handle_lua_error(sol::protected_function_result &luares)
|
||||
{
|
||||
sol::error luaerr = luares;
|
||||
const auto msg = luaerr.what();
|
||||
std::cerr << msg << std::endl;
|
||||
if (msg != nullptr) {
|
||||
std::cerr << msg << "\n";
|
||||
} else {
|
||||
std::cerr << "unknown error\n";
|
||||
}
|
||||
throw util::exception("Lua error (see stderr for traceback)");
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user