Navigation Menu

Skip to content

Commit

Permalink
SAPI: Throw runtime error instead of if l_get_mapgen_object called in…
Browse files Browse the repository at this point in the history
… incorrect thread
  • Loading branch information
kwolekr committed Oct 26, 2015
1 parent 54f1267 commit d69ef6a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/script/lua_api/l_mapgen.cpp
Expand Up @@ -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;

Expand Down

0 comments on commit d69ef6a

Please sign in to comment.