diff --git a/src/common/framecmn.cpp b/src/common/framecmn.cpp index a1c9575cfa..e07790dfd8 100644 --- a/src/common/framecmn.cpp +++ b/src/common/framecmn.cpp @@ -305,8 +305,6 @@ wxStatusBar *wxFrameBase::OnCreateStatusBar(int number, void wxFrameBase::SetStatusText(const wxString& text, int number) { - wxASSERT_MSG( (m_widget != NULL), wxT("invalid frame") ); - wxCHECK_RET( m_frameStatusBar != NULL, wxT("no statusbar to set text for") ); m_frameStatusBar->SetStatusText(text, number); @@ -314,8 +312,6 @@ void wxFrameBase::SetStatusText(const wxString& text, int number) void wxFrameBase::SetStatusWidths(int n, const int widths_field[] ) { - wxASSERT_MSG( (m_widget != NULL), wxT("invalid frame") ); - wxCHECK_RET( m_frameStatusBar != NULL, wxT("no statusbar to set widths for") ); m_frameStatusBar->SetStatusWidths(n, widths_field); diff --git a/src/msw/statbr95.cpp b/src/msw/statbr95.cpp index 5f91a3c092..87455611bf 100644 --- a/src/msw/statbr95.cpp +++ b/src/msw/statbr95.cpp @@ -147,6 +147,9 @@ void wxStatusBar95::SetStatusWidths(int n, const int widths[]) void wxStatusBar95::SetFieldsWidth() { + if ( !m_nFields ) + return; + int *pWidths = new int[m_nFields]; int nWindowWidth, y;