Remove views in destructor

- This avoid a use-after-free when the view remove itself in its dtor
This commit is contained in:
Hubert Figuière
2021-02-26 22:28:56 -05:00
parent 4f620072e0
commit cd68bb16a5
+7
View File
@@ -45,6 +45,13 @@ public:
mModel = Model;
mActiveView = nullptr;
}
~lcModelTabWidget()
{
for (auto View : mViews)
{
RemoveView(View);
}
}
void ResetLayout();
void Clear();