Fix assert when removing CurPart
Fixes: lp:1762099 * https://bugs.launchpad.net/kicad/+bug/1762099
This commit is contained in:
parent
853f73e6b7
commit
2d5da8b04f
|
@ -1024,11 +1024,16 @@ wxString LIB_EDIT_FRAME::SetCurLib( const wxString& aLibNickname )
|
||||||
|
|
||||||
void LIB_EDIT_FRAME::SetCurPart( LIB_PART* aPart )
|
void LIB_EDIT_FRAME::SetCurPart( LIB_PART* aPart )
|
||||||
{
|
{
|
||||||
|
if( !aPart && !m_my_part )
|
||||||
|
return;
|
||||||
|
|
||||||
wxASSERT( m_my_part != aPart );
|
wxASSERT( m_my_part != aPart );
|
||||||
|
|
||||||
if( m_my_part != aPart )
|
if( m_my_part != aPart )
|
||||||
{
|
{
|
||||||
delete m_my_part;
|
if( m_my_part )
|
||||||
|
delete m_my_part;
|
||||||
|
|
||||||
m_my_part = aPart;
|
m_my_part = aPart;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue