Unregister LUA widgets when the factory is destoyed

Resolves #183
This commit is contained in:
Raphael Coeffic
2021-06-12 07:38:30 +02:00
parent 4e1427c4a7
commit c37bc91475
3 changed files with 12 additions and 0 deletions
+5
View File
@@ -225,6 +225,11 @@ class LuaWidgetFactory: public WidgetFactory
{
}
~LuaWidgetFactory()
{
unregisterWidget(this);
}
Widget * create(FormGroup * parent, const rect_t & rect, Widget::PersistentData * persistentData, bool init=true) const override
{
if (lsWidgets == 0) return 0;