diff --git a/pcbnew/board_commit.cpp b/pcbnew/board_commit.cpp index 2db9b32c65..f68781789c 100644 --- a/pcbnew/board_commit.cpp +++ b/pcbnew/board_commit.cpp @@ -62,7 +62,9 @@ BOARD_COMMIT::BOARD_COMMIT( TOOL_MANAGER* aMgr ) : m_toolMgr( aMgr ), m_isBoardEditor( false ) { - if( dynamic_cast( aMgr->GetToolHolder() ) ) + EDA_DRAW_FRAME* frame = dynamic_cast( aMgr->GetToolHolder() ); + + if( frame && frame->IsType( FRAME_PCB_EDITOR ) ) m_isBoardEditor = true; }