SAPI: Throw runtime error instead of if l_get_mapgen_object called in incorrect thread

This commit is contained in:
kwolekr 2015-10-25 23:12:59 -04:00
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;