mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
SAPI: Throw runtime error instead of if l_get_mapgen_object called in incorrect thread
This commit is contained in:
parent
54f1267c2c
commit
d69ef6acd3
1 changed files with 1 additions and 1 deletions
|
@ -493,7 +493,7 @@ int ModApiMapgen::l_get_mapgen_object(lua_State *L)
|
|||
EmergeManager *emerge = getServer(L)->getEmergeManager();
|
||||
Mapgen *mg = emerge->getCurrentMapgen();
|
||||
if (!mg)
|
||||
return 0;
|
||||
throw LuaError("Must only be called in a mapgen thread!");
|
||||
|
||||
size_t maplen = mg->csize.X * mg->csize.Z;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue