Eeschema: fix segfault when drawing new sheet after deleting existing sheet with the same file. (fixes lp:1538510)

This commit is contained in:
Wayne Stambaugh 2016-02-02 11:54:54 -05:00
parent 896bd3945d
commit 783f818f19
1 changed files with 1 additions and 1 deletions

View File

@ -357,7 +357,7 @@ SCH_SHEET* SCH_EDIT_FRAME::CreateSheet( wxDC* aDC )
sheet->SetFlags( IS_NEW | IS_RESIZED );
sheet->SetTimeStamp( GetNewTimeStamp() );
sheet->SetParent( GetScreen() );
sheet->SetParent( GetCurrentSheet().Last() );
sheet->SetScreen( NULL );
// need to check if this is being added to the GetDrawItems().