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:
parent
bfc3dcbe26
commit
5bf257cdf6
|
@ -68,7 +68,7 @@ void RATSNEST_VIEW_ITEM::ViewDraw( int aLayer, KIGFX::VIEW* aView ) const
|
||||||
|
|
||||||
constexpr int CROSS_SIZE = 200000;
|
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 )
|
if( !cfg )
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue