From 2ec3cd91fa92bdbda073b1281d89592a7da0a363 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Mon, 20 Nov 2023 10:01:38 +0000 Subject: [PATCH] Nullptr safety. --- 3d-viewer/3d_canvas/board_adapter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/3d-viewer/3d_canvas/board_adapter.cpp b/3d-viewer/3d_canvas/board_adapter.cpp index 2da096dbfd..dcc64899a4 100644 --- a/3d-viewer/3d_canvas/board_adapter.cpp +++ b/3d-viewer/3d_canvas/board_adapter.cpp @@ -368,7 +368,7 @@ void BOARD_ADAPTER::InitSettings( REPORTER* aStatusReporter, REPORTER* aWarningR m_biuTo3Dunits = RANGE_SCALE_3D / std::max( m_boardSize.x, m_boardSize.y ); // Hack to keep "home" zoom from being too small. - if( !m_board->IsFootprintHolder() ) + if( !m_board || !m_board->IsFootprintHolder() ) m_biuTo3Dunits *= 1.6f; m_boardBodyThickness3DU = DEFAULT_BOARD_THICKNESS * m_biuTo3Dunits;