diff --git a/eeschema/sch_edit_frame.cpp b/eeschema/sch_edit_frame.cpp index e7a4552651..80dfee6288 100644 --- a/eeschema/sch_edit_frame.cpp +++ b/eeschema/sch_edit_frame.cpp @@ -172,7 +172,7 @@ PART_LIBS* PROJECT::SchLibs() catch( const PARSE_ERROR& pe ) { wxString lib_list = UTF8( pe.inputLine ); - wxWindow* parent = 0; // Pgm().App().GetTopWindow(); + wxWindow* parent = Pgm().App().GetTopWindow(); // parent of this dialog cannot be NULL since that breaks the Kiway() chain. HTML_MESSAGE_BOX dlg( parent, _( "Not Found" ) ); @@ -187,7 +187,9 @@ PART_LIBS* PROJECT::SchLibs() } catch( const IO_ERROR& ioe ) { - DisplayError( NULL, ioe.What() ); + wxWindow* parent = Pgm().App().GetTopWindow(); + + DisplayError( parent, ioe.What() ); } }