Kicad manager: fix a potential bug which could crash Kicad manager.

This commit is contained in:
Jean-Pierre Charras 2015-12-07 09:55:59 -05:00 committed by Wayne Stambaugh
parent f11b426151
commit 7fb6698e29
1 changed files with 2 additions and 1 deletions

View File

@ -173,7 +173,8 @@ void TREEPROJECT_ITEM::Activate( TREE_PROJECT_FRAME* prjframe )
wxString fullFileName = GetFileName();
wxTreeItemId id = GetId();
KICAD_MANAGER_FRAME* frame = (KICAD_MANAGER_FRAME*) Pgm().App().GetTopWindow();
KICAD_MANAGER_FRAME* frame = prjframe->m_Parent;
wxASSERT( frame );
switch( GetType() )
{