From 1e223b90271807eb954da138c70eb38a10470c1f Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Thu, 13 Sep 2018 21:05:24 +0100 Subject: [PATCH] Don't use nullprt for a dialog's parent. Fixes: lp:1791561 * https://bugs.launchpad.net/kicad/+bug/1791561 (cherry picked from commit 3f23e9ac46ebccc99b521efde1da457a5437da64) --- eeschema/sch_edit_frame.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/eeschema/sch_edit_frame.cpp b/eeschema/sch_edit_frame.cpp index c222451dcc..2ae60d4e17 100644 --- a/eeschema/sch_edit_frame.cpp +++ b/eeschema/sch_edit_frame.cpp @@ -171,7 +171,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" ) ); @@ -186,7 +186,9 @@ PART_LIBS* PROJECT::SchLibs() } catch( const IO_ERROR& ioe ) { - DisplayError( NULL, ioe.What() ); + wxWindow* parent = Pgm().App().GetTopWindow(); + + DisplayError( parent, ioe.What() ); } }