From c8cf11b11bc26e5af357891e2ea19468d92043fe Mon Sep 17 00:00:00 2001 From: YuSanka Date: Fri, 3 Apr 2020 12:51:20 +0200 Subject: [PATCH] Added missed destroy for search_line --- src/slic3r/GUI/Search.cpp | 5 +++-- src/slic3r/GUI/Search.hpp | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/slic3r/GUI/Search.cpp b/src/slic3r/GUI/Search.cpp index f3a0386b5..9c3a79f3c 100644 --- a/src/slic3r/GUI/Search.cpp +++ b/src/slic3r/GUI/Search.cpp @@ -431,8 +431,7 @@ void PopupSearchList::update_list(std::vector& 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) diff --git a/src/slic3r/GUI/Search.hpp b/src/slic3r/GUI/Search.hpp index 6718f3af1..523457976 100644 --- a/src/slic3r/GUI/Search.hpp +++ b/src/slic3r/GUI/Search.hpp @@ -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};