From 993e6b1759ea2b5c315801bc4f434b3fab8466ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9gory=20Soutad=C3=A9?= Date: Thu, 26 Apr 2012 20:59:01 +0200 Subject: [PATCH] Fix a bug : buttons doesn't disappear on KillMe --- src/view/wxUI.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/view/wxUI.cpp b/src/view/wxUI.cpp index 5ac2d82..6defc4e 100644 --- a/src/view/wxUI.cpp +++ b/src/view/wxUI.cpp @@ -326,8 +326,9 @@ void wxUI::KillMe() { if (*it) { - _buttonsBox->removeWidget(*it); + _buttonsBox->removeWidget(*_buttons.begin()); delete *it; + delete *_buttons.begin(); } _buttons.erase(_buttons.begin()); }