Don't free state images too early

SetImageList relies on the state images still being valid

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16022
This commit is contained in:
Jon Evans 2023-11-17 13:11:27 -05:00
parent aa421f036d
commit fc40b48186
1 changed files with 1 additions and 1 deletions

View File

@ -69,7 +69,6 @@ PROJECT_TREE::~PROJECT_TREE()
void PROJECT_TREE::LoadIcons()
{
delete m_imageList;
delete m_statusImageList;
int size = 24;
@ -114,6 +113,7 @@ void PROJECT_TREE::LoadIcons()
wxBitmap blank_bitmap( size, size );
delete m_statusImageList;
m_statusImageList = new wxImageList( size, size, true,
static_cast<int>( KIGIT_COMMON::GIT_STATUS::GIT_STATUS_LAST ) );