GUI: Fix memory leaks in LoadChooserThumbnailed::destroyButtons.
GuiObject::removeWidget only removes the widget from the widget list, but doesn't delete it. Oops.
This commit is contained in:
parent
d3e5763276
commit
37fd9b7384
1 changed files with 3 additions and 0 deletions
|
@ -595,8 +595,11 @@ int LoadChooserThumbnailed::runIntern() {
|
|||
void LoadChooserThumbnailed::destroyButtons() {
|
||||
for (ButtonArray::iterator i = _buttons.begin(), end = _buttons.end(); i != end; ++i) {
|
||||
removeWidget(i->container);
|
||||
delete i->container;
|
||||
removeWidget(i->button);
|
||||
delete i->button;
|
||||
removeWidget(i->description);
|
||||
delete i->description;
|
||||
}
|
||||
|
||||
_buttons.clear();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue