Don't blindly cast to PCBNEW_SETTING: we may be in CVPCB....

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15153
This commit is contained in:
Jeff Young 2023-07-08 22:46:41 +01:00
parent bfc3dcbe26
commit 5bf257cdf6
1 changed files with 1 additions and 1 deletions

View File

@ -68,7 +68,7 @@ void RATSNEST_VIEW_ITEM::ViewDraw( int aLayer, KIGFX::VIEW* aView ) const
constexpr int CROSS_SIZE = 200000;
PCBNEW_SETTINGS* cfg = static_cast<PCBNEW_SETTINGS*>( Kiface().KifaceSettings() );
PCBNEW_SETTINGS* cfg = dynamic_cast<PCBNEW_SETTINGS*>( Kiface().KifaceSettings() );
if( !cfg )
return;