X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/31528cd3cac75558beef4bce0ba21fd182a808ab..2e1a688e3e9c6c265620e4f05d579077367e9fdb:/src/gtk1/statbmp.cpp?ds=sidebyside diff --git a/src/gtk1/statbmp.cpp b/src/gtk1/statbmp.cpp index e46ae8134d..74f494f6e9 100644 --- a/src/gtk1/statbmp.cpp +++ b/src/gtk1/statbmp.cpp @@ -37,7 +37,7 @@ wxStaticBitmap::wxStaticBitmap( wxWindow *parent, wxWindowID id, const wxBitmap void wxStaticBitmap::CreatePixmapWidget() { - wxCHECK_RET( m_bitmap.Ok(), _T("should only be called if we have a bitmap") ); + wxCHECK_RET( m_bitmap.Ok(), wxT("should only be called if we have a bitmap") ); GdkBitmap *mask = (GdkBitmap *) NULL; if ( m_bitmap.GetMask() ) @@ -58,14 +58,19 @@ bool wxStaticBitmap::Create( wxWindow *parent, wxWindowID id, const wxBitmap &bi { m_needParent = TRUE; - wxSize newSize = size; - - PreCreation( parent, id, pos, size, style, name ); + if (!PreCreation( parent, pos, size ) || + !CreateBase( parent, id, pos, size, style, wxDefaultValidator, name )) + { + wxFAIL_MSG( wxT("wxXX creation failed") ); + return FALSE; + } m_bitmap = bitmap; if (m_bitmap.Ok()) { + wxSize newSize = size; + GdkBitmap *mask = (GdkBitmap *) NULL; if ( m_bitmap.GetMask() ) mask = m_bitmap.GetMask()->GetBitmap();