Symbol Editor: fixed a crash when modifying a symbol
In the scenario described in the bug report, the SCH_SCREEN current item pointer stores an address of a stale object that had been deleted when the symbol was reloaded. To prevent the crash, the current item pointer is reset whenever a symbol is loaded. Fixes: lp:1774296 * https://bugs.launchpad.net/kicad/+bug/1774296
This commit is contained in:
parent
3ce8a4856a
commit
c5cde53dff
|
@ -1056,10 +1056,11 @@ wxString LIB_EDIT_FRAME::SetCurLib( const wxString& aLibNickname )
|
|||
|
||||
void LIB_EDIT_FRAME::SetCurPart( LIB_PART* aPart )
|
||||
{
|
||||
if( !aPart && !m_my_part )
|
||||
return;
|
||||
if( !aPart && !m_my_part )
|
||||
return;
|
||||
|
||||
wxASSERT( m_my_part != aPart );
|
||||
GetScreen()->SetCurItem( nullptr );
|
||||
|
||||
if( m_my_part != aPart )
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue