schematic: prevent crash in symbol browser with no grids

This commit is contained in:
Mike Williams
2025-08-20 15:20:13 -04:00
parent 92ef03cf15
commit 36ee61dfe4
+5
View File
@@ -65,6 +65,11 @@ void COMMON_TOOLS::Reset( RESET_REASON aReason )
return;
GRID_SETTINGS& settings = m_frame->GetWindowSettings( m_toolMgr->GetSettings() )->grid;
// Protect against misconfigured settings with no grids
if( settings.grids.empty() )
settings.grids = m_frame->config()->DefaultGridSizeList();
EDA_IU_SCALE scale = m_frame->GetIuScale();
for( GRID& gridDef : settings.grids )