From 3175c712e9901d45fb8748df1062a3af6ebd314b Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 16 Nov 1999 23:09:32 +0000 Subject: [PATCH] wxMSW fixes after wxFrameBase change - seems to work ok too by now git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4596 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/framecmn.cpp | 4 ---- src/msw/statbr95.cpp | 3 +++ 2 files changed, 3 insertions(+), 4 deletions(-) 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; -- 2.45.2