Skip to content
Permalink
Browse files

SAPI: Throw runtime error instead of if l_get_mapgen_object called in…

… incorrect thread
  • Loading branch information
kwolekr committed Oct 26, 2015
1 parent 54f1267 commit d69ef6acd386ccfd5ff456002591b97b92a26956
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/script/lua_api/l_mapgen.cpp
@@ -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;

0 comments on commit d69ef6a

Please sign in to comment.