From 5ea170baabe863f883f770cd6fbac7c03abbcae9 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Wed, 26 Jul 2023 08:58:22 +0200 Subject: [PATCH] Symbol editor: fix crash when trying to "drag" an item. Drag or move is an option of the schematic editor, and not in symbol editor. So it cannot be tested in code for the symbol editor. Fixes #15264 https://gitlab.com/kicad/code/kicad/-/issues/15264 --- eeschema/tools/ee_selection_tool.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/eeschema/tools/ee_selection_tool.cpp b/eeschema/tools/ee_selection_tool.cpp index 46315eabcc..9afc3500f1 100644 --- a/eeschema/tools/ee_selection_tool.cpp +++ b/eeschema/tools/ee_selection_tool.cpp @@ -546,7 +546,9 @@ int EE_SELECTION_TOOL::Main( const TOOL_EVENT& aEvent ) // Check if dragging has started within any of selected items bounding box if( selectionContains( evt->DragOrigin() ) ) { - if( m_frame->eeconfig()->m_Input.drag_is_move ) + // drag_is_move option exists only in schematic editor, not in symbol editor + // (m_frame->eeconfig() returns nullptr in Symbol Editor) + if( m_isSymbolEditor || m_frame->eeconfig()->m_Input.drag_is_move ) m_toolMgr->RunSynchronousAction( EE_ACTIONS::move, nullptr ); else m_toolMgr->RunSynchronousAction( EE_ACTIONS::drag, nullptr );