Skip to content

Commit

Permalink
Make it optional for the map generator user_config to return the new …
Browse files Browse the repository at this point in the history
…settings
  • Loading branch information
CelticMinstrel committed Aug 27, 2017
1 parent 21568c8 commit 9cffcff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/scripting/mapgen_lua_kernel.cpp
Expand Up @@ -155,7 +155,7 @@ void mapgen_lua_kernel::run_generator(const char * prog, const config & generato
void mapgen_lua_kernel::user_config(const char * prog, config & generator)
{
run_generator(prog, generator);
if(!luaW_toconfig(mState, -1, generator)) {
if(!lua_isnoneornil(mState, -1) && !luaW_toconfig(mState, -1, generator)) {
std::string msg = "expected a string, found a ";
msg += lua_typename(mState, lua_type(mState, -1));
lua_pop(mState, 1);
Expand Down

0 comments on commit 9cffcff

Please sign in to comment.