Added missed destroy for search_line

This commit is contained in:
YuSanka 2020-04-03 12:51:20 +02:00
parent 2a9190c27d
commit c8cf11b11b
2 changed files with 4 additions and 3 deletions

View File

@ -431,8 +431,7 @@ void PopupSearchList::update_list(std::vector<SearchOptions::Filter>& filters)
// SearchCtrl
//------------------------------------------
SearchCtrl::SearchCtrl(wxWindow* parent):
parent(parent)
SearchCtrl::SearchCtrl(wxWindow* parent)
{
popup_win = new PopupSearchList(parent);
box_sizer = new wxBoxSizer(wxHORIZONTAL);
@ -451,6 +450,8 @@ SearchCtrl::SearchCtrl(wxWindow* parent):
SearchCtrl::~SearchCtrl()
{
if (search_line)
search_line->Destroy();
if (search_btn)
search_btn->Destroy();
if (popup_win)

View File

@ -149,7 +149,7 @@ private:
class SearchCtrl
{
wxWindow* parent {nullptr};
// wxWindow* parent {nullptr};
wxBoxSizer* box_sizer {nullptr};
wxTextCtrl* search_line {nullptr};
ScalableButton* search_btn {nullptr};