From 4ad6244d8dca857f7b5903a13f4da2917f2ab1bd Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Sat, 8 Jul 2023 22:46:41 +0100 Subject: [PATCH] Don't blindly cast to PCBNEW_SETTING: we may be in CVPCB.... Fixes https://gitlab.com/kicad/code/kicad/-/issues/15153 (cherry picked from commit 5bf257cdf61b042d22d5634f41e6819300c4f9ac) --- pcbnew/ratsnest/ratsnest_view_item.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pcbnew/ratsnest/ratsnest_view_item.cpp b/pcbnew/ratsnest/ratsnest_view_item.cpp index ee4f5e7238..68da5f4d2d 100644 --- a/pcbnew/ratsnest/ratsnest_view_item.cpp +++ b/pcbnew/ratsnest/ratsnest_view_item.cpp @@ -71,7 +71,7 @@ void RATSNEST_VIEW_ITEM::ViewDraw( int aLayer, KIGFX::VIEW* aView ) const gal->SetIsStroke( true ); gal->SetIsFill( false ); gal->SetLineWidth( 1.0 ); - auto cfg = static_cast( Kiface().KifaceSettings() ); + auto cfg = dynamic_cast( Kiface().KifaceSettings() ); if( !cfg ) return;