From 407514919d90ac7997e1c6cbb196521f1323c83a Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Fri, 3 Jun 2022 10:05:19 -0700 Subject: [PATCH] Prevent null dereference --- eeschema/toolbars_sch_editor.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/eeschema/toolbars_sch_editor.cpp b/eeschema/toolbars_sch_editor.cpp index 520f8c5e6c..b102aa016e 100644 --- a/eeschema/toolbars_sch_editor.cpp +++ b/eeschema/toolbars_sch_editor.cpp @@ -234,7 +234,9 @@ void SCH_EDIT_FRAME::ToggleSchematicHierarchy() SetAuiPaneSize( m_auimgr, hierarchy, cfg->m_AuiPanels.left_panel_width, -1 ); else { - cfg->m_AuiPanels.left_panel_width = m_hierarchy->GetSize().x; + if( cfg ) + cfg->m_AuiPanels.left_panel_width = m_hierarchy->GetSize().x; + m_auimgr.Update(); } }