Fixed SIM_PLOT_FRAME::CurrentPlot()

This commit is contained in:
Maciej Suminski 2016-08-11 14:42:12 +02:00
parent 4ecc17385d
commit 7b81516b61
1 changed files with 3 additions and 1 deletions

View File

@ -274,7 +274,9 @@ void SIM_PLOT_FRAME::RemoveTuner( TUNER_SLIDER* aTuner, bool aErase )
SIM_PLOT_PANEL* SIM_PLOT_FRAME::CurrentPlot() const
{
return static_cast<SIM_PLOT_PANEL*>( m_plotNotebook->GetCurrentPage() );
wxWindow* curPage = m_plotNotebook->GetCurrentPage();
return ( curPage == m_welcomePanel ) ? nullptr : static_cast<SIM_PLOT_PANEL*>( curPage );
}