Prevent use-after-free of symbol screens

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17204
This commit is contained in:
Jon Evans 2024-03-05 22:53:51 -05:00
parent 0c2a084a47
commit 1600d8bead
1 changed files with 1 additions and 0 deletions

View File

@ -1524,6 +1524,7 @@ void SYMBOL_EDIT_FRAME::KiwayMailIn( KIWAY_EXPRESS& mail )
{
wxLogTrace( "KICAD_LIB_WATCH", "Refreshing symbol %s", symbol->GetName() );
SetScreen( m_dummyScreen ); // UpdateLibraryBuffer will destroy the old screen
m_libMgr->UpdateLibraryBuffer( libName );
LIB_SYMBOL* lib_symbol = m_libMgr->GetBufferedSymbol( symbol->GetName(), libName );