Prevent VIEW::UpdateItems and onShowTimer from firing repaints if GAL did not complete init

This appears to be a possible event race on startup

Fixes sentry KICAD-10A
This commit is contained in:
Marek Roszko 2023-04-11 22:09:05 -04:00
parent 37eaa29679
commit bfad8bb0d5
2 changed files with 2 additions and 2 deletions

View File

@ -628,7 +628,7 @@ void EDA_DRAW_PANEL_GAL::onRefreshTimer( wxTimerEvent& aEvent )
void EDA_DRAW_PANEL_GAL::onShowTimer( wxTimerEvent& aEvent )
{
if( m_gal && m_gal->IsVisible() )
if( m_gal && m_gal->IsInitialized() && m_gal->IsVisible() )
{
m_onShowTimer.Stop();
OnShow();

View File

@ -1420,7 +1420,7 @@ void VIEW::RecacheAllItems()
void VIEW::UpdateItems()
{
if( !m_gal->IsVisible() )
if( !m_gal->IsVisible() || !m_gal->IsInitialized() )
return;
unsigned int cntGeomUpdate = 0;