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


(cherry picked from commit bfad8bb0d5)
This commit is contained in:
Marek Roszko 2023-04-11 22:09:05 -04:00 committed by Mark Roszko
parent 5527c12a8d
commit 35def3ab2e
2 changed files with 2 additions and 2 deletions

View File

@ -626,7 +626,7 @@ void EDA_DRAW_PANEL_GAL::onRefreshTimer( wxTimerEvent& aEvent )
void EDA_DRAW_PANEL_GAL::onShowTimer( 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(); m_onShowTimer.Stop();
OnShow(); OnShow();

View File

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