forked from Mirrorlandia_minetest/minetest
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