mirror of
https://github.com/minetest/minetest.git
synced 2024-11-27 10:03:45 +01: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
@ -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…
Reference in New Issue
Block a user