Browse Source

eeschema: Don't free pointers held by undo stack

pull/15/head
Seth Hillbrand 6 years ago
parent
commit
68451a2a9c
  1. 4
      eeschema/edit_label.cpp

4
eeschema/edit_label.cpp

@ -162,7 +162,9 @@ void SCH_EDIT_FRAME::ConvertTextType( SCH_TEXT* aText, KICAD_T aType )
if( selected ) if( selected )
m_toolManager->RunAction( EE_ACTIONS::addItemToSel, true, newtext ); m_toolManager->RunAction( EE_ACTIONS::addItemToSel, true, newtext );
delete aText;
// Otherwise, pointer is owned by the undo stack
if( aText->IsNew() )
delete aText;
OnModify(); OnModify();
} }

Loading…
Cancel
Save