X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/dcf924a345ea8ffbc1cf6b40b5f75c6005e504c0..5ebdc86afc95a60fbeb0b2a71c38dd26c8a1b0b4:/src/gtk1/statbox.cpp diff --git a/src/gtk1/statbox.cpp b/src/gtk1/statbox.cpp index 84fd9673ff..b7697b9ce7 100644 --- a/src/gtk1/statbox.cpp +++ b/src/gtk1/statbox.cpp @@ -41,11 +41,19 @@ bool wxStaticBox::Create( wxWindow *parent, wxWindowID id, const wxString &label { m_needParent = TRUE; - PreCreation( parent, id, pos, size, style, name ); + if (!PreCreation( parent, pos, size ) || + !CreateBase( parent, id, pos, size, style, wxDefaultValidator, name )) + { + wxFAIL_MSG( wxT("wxStaticBox creation failed") ); + return FALSE; + } m_isStaticBox = TRUE; - m_widget = gtk_frame_new(m_label.mbc_str()); + if (label.IsEmpty()) + m_widget = gtk_frame_new( (char*) NULL ); + else + m_widget = gtk_frame_new( m_label.mbc_str() ); m_parent->DoAddChild( this );