feat(color): enhancements and fixes to the LVGL Lua API's (#6351)

This commit is contained in:
philmoz
2025-06-13 11:10:50 +10:00
committed by GitHub
parent 5c04801162
commit 3475978dd8
12 changed files with 194 additions and 77 deletions
+4 -3
View File
@@ -49,9 +49,8 @@ LuaWidgetFactory::LuaWidgetFactory(const char* name, ZoneOption* widgetOptions,
LuaWidgetFactory::~LuaWidgetFactory() {
unregisterWidget(this);
if (displayName) {
delete displayName;
}
if (name) delete name;
if (displayName) delete displayName;
auto option = getDefaultOptions();
while (option && option->name != nullptr) {
@@ -277,6 +276,7 @@ ZoneOption* LuaWidgetFactory::parseOptionDefinitions(int reference)
for (lua_pushnil(lsWidgets); lua_next(lsWidgets, -2); lua_pop(lsWidgets, 1)) {
count++;
}
lua_pop(lsWidgets, 1);
// TRACE("we have %d options", count);
if (count > MAX_WIDGET_OPTIONS) {
@@ -337,6 +337,7 @@ ZoneOption* LuaWidgetFactory::parseOptionDefinitions(int reference)
}
option++;
}
lua_pop(lsWidgets, 1);
option->name = NULL; // sentinel
}
else