mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-13 07:21:08 -06:00
Another fix for StringListProperty
Do not crash if included script file does not provide a documentation key
This commit is contained in:
@@ -274,6 +274,7 @@ void ScriptEngine::addLibraryFunctions(lua_State* state, LuaLibrary& library,
|
||||
ghoul::lua::runScriptFile(state, absPath(script));
|
||||
|
||||
library.documentations.clear();
|
||||
|
||||
// Then, we extract the documentation information from the file
|
||||
lua_pushstring(state, "documentation");
|
||||
lua_gettable(state, -2);
|
||||
@@ -303,10 +304,9 @@ void ScriptEngine::addLibraryFunctions(lua_State* state, LuaLibrary& library,
|
||||
lua_pop(state, 1);
|
||||
|
||||
library.documentations.push_back({ name, arguments, documentation });
|
||||
|
||||
}
|
||||
lua_pop(state, 1);
|
||||
}
|
||||
lua_pop(state, 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user