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:
Maciej Suminski 2018-11-16 14:09:36 +01:00
parent 4050991d28
commit de1a8abd3e
1 changed files with 1 additions and 0 deletions

View File

@ -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 );