diff --git a/eeschema/widgets/search_handlers.h b/eeschema/widgets/search_handlers.h index 8cc955d210..b0a474cbcc 100644 --- a/eeschema/widgets/search_handlers.h +++ b/eeschema/widgets/search_handlers.h @@ -48,6 +48,9 @@ public: wxString GetResultCell( int aRow, int aCol ) override { + if( m_frame->IsClosing() ) + return wxEmptyString; + if( aRow >= static_cast( m_hitlist.size() ) ) return wxEmptyString; diff --git a/include/eda_base_frame.h b/include/eda_base_frame.h index 127616fd06..44d8affc36 100644 --- a/include/eda_base_frame.h +++ b/include/eda_base_frame.h @@ -589,6 +589,8 @@ public: */ virtual void OnModify(); + bool IsClosing() const { return m_isClosing; } + bool NonUserClose( bool aForce ) { m_isNonUserClose = true; diff --git a/pcbnew/widgets/search_handlers.h b/pcbnew/widgets/search_handlers.h index e89e1ee03f..0858a2b804 100644 --- a/pcbnew/widgets/search_handlers.h +++ b/pcbnew/widgets/search_handlers.h @@ -39,6 +39,9 @@ public: wxString GetResultCell( int aRow, int aCol ) override { + if( m_frame->IsClosing() ) + return wxEmptyString; + if( aRow >= static_cast(m_hitlist.size() ) ) return wxEmptyString;