GalleryDialog: Fixed a memory leak

This commit is contained in:
YuSanka 2023-08-10 15:06:36 +02:00
parent 6215393ae5
commit 8a1a5d2259

View File

@ -134,7 +134,12 @@ GalleryDialog::GalleryDialog(wxWindow* parent) :
}
GalleryDialog::~GalleryDialog()
{
{
// From wxWidgets docs:
// The method void wxListCtrl::SetImageList(wxImageList* imageList, int which)
// does not take ownership of the image list, you have to delete it yourself.
if (m_image_list)
delete m_image_list;
}
int GalleryDialog::show(bool show_from_menu)