projects
/
oweals
/
minetest.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
54f1267
)
SAPI: Throw runtime error instead of if l_get_mapgen_object called in incorrect thread
author
kwolekr
<kwolekr@minetest.net>
Mon, 26 Oct 2015 03:12:59 +0000
(23:12 -0400)
committer
kwolekr
<kwolekr@minetest.net>
Mon, 26 Oct 2015 03:15:57 +0000
(23:15 -0400)
src/script/lua_api/l_mapgen.cpp
patch
|
blob
|
history
diff --git
a/src/script/lua_api/l_mapgen.cpp
b/src/script/lua_api/l_mapgen.cpp
index 825292419a7968e8c8a1c6f8bf4f567a7a3495d9..7adb6a534d70d76e9de43952ff0309ebff0b6314 100644
(file)
--- a/
src/script/lua_api/l_mapgen.cpp
+++ b/
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;