Fix a crash after accepting changes from Pin Table dialog
Pin Table dialog replaces LIB_ITEMs, while one of them may still be pointed to as the current library item. Certain wxUpdateUIEvent will try to dereference the pointer, leading to a crash.
This commit is contained in:
parent
4050991d28
commit
de1a8abd3e
|
@ -1460,6 +1460,7 @@ void LIB_EDIT_FRAME::OnOpenPinTable( wxCommandEvent& aEvent )
|
|||
{
|
||||
LIB_PART* part = GetCurPart();
|
||||
SaveCopyInUndoList( part );
|
||||
SetDrawItem( nullptr );
|
||||
|
||||
DIALOG_LIB_EDIT_PIN_TABLE dlg( this, part );
|
||||
|
||||
|
|
Loading…
Reference in New Issue