Fix crash when welcome panel was present in simulator and white background is toggled
Fix #6872
This commit is contained in:
parent
3adff647a7
commit
230f3c2792
|
@ -1216,7 +1216,13 @@ void SIM_PLOT_FRAME::menuWhiteBackground( wxCommandEvent& event )
|
|||
if( curPage == m_welcomePanel )
|
||||
continue;
|
||||
|
||||
static_cast<SIM_PLOT_PANEL*>( curPage )->UpdatePlotColors();
|
||||
// ensure it is truely a plot panel and not the welcome panel which is only SIM_PLOT_PANEL_BASE
|
||||
SIM_PLOT_PANEL* panel = dynamic_cast<SIM_PLOT_PANEL*>( curPage );
|
||||
|
||||
if( panel != nullptr )
|
||||
{
|
||||
panel->UpdatePlotColors();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue