From c7dc319737e9677a0061388ba7cc006014e9f2f4 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Mon, 5 May 2014 17:15:54 +0200 Subject: [PATCH] Kicad: fix crash on exit, when Libedit was called during a session. It fixes also a crash if Libedit was called, closed and reopened. Happens only if eeschema was called from the Kicad manager. --- eeschema/eeschema.cpp | 3 +-- eeschema/libeditframe.cpp | 2 +- eeschema/libeditframe.h | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/eeschema/eeschema.cpp b/eeschema/eeschema.cpp index 911c1d138d..52da445fd0 100644 --- a/eeschema/eeschema.cpp +++ b/eeschema/eeschema.cpp @@ -99,8 +99,7 @@ static struct IFACE : public KIFACE_I case FRAME_SCH_LIB_EDITOR: { - LIB_EDIT_FRAME* frame = new LIB_EDIT_FRAME( aKiway, - dynamic_cast( aParent ) ); + LIB_EDIT_FRAME* frame = new LIB_EDIT_FRAME( aKiway, aParent ); return frame; } break; diff --git a/eeschema/libeditframe.cpp b/eeschema/libeditframe.cpp index 49ea88353d..5edc5badb4 100644 --- a/eeschema/libeditframe.cpp +++ b/eeschema/libeditframe.cpp @@ -187,7 +187,7 @@ END_EVENT_TABLE() #define LIB_EDIT_FRAME_NAME wxT( "LibeditFrame" ) -LIB_EDIT_FRAME::LIB_EDIT_FRAME( KIWAY* aKiway, SCH_EDIT_FRAME* aParent ) : +LIB_EDIT_FRAME::LIB_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) : SCH_BASE_FRAME( aKiway, aParent, FRAME_SCH_LIB_EDITOR, _( "Library Editor" ), wxDefaultPosition, wxDefaultSize, KICAD_DEFAULT_DRAWFRAME_STYLE, GetLibEditFrameName() ) { diff --git a/eeschema/libeditframe.h b/eeschema/libeditframe.h index 07a52b6203..106ef8830b 100644 --- a/eeschema/libeditframe.h +++ b/eeschema/libeditframe.h @@ -122,7 +122,7 @@ class LIB_EDIT_FRAME : public SCH_BASE_FRAME public: - LIB_EDIT_FRAME( KIWAY* aKiway, SCH_EDIT_FRAME* aParent ); + LIB_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ); ~LIB_EDIT_FRAME();