X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5366ff46b8631f4f353606a425cebbb2b7ebbf0b..52147d1c4bb54b904253e388da76747e459157c0:/src/gtk/button.cpp diff --git a/src/gtk/button.cpp b/src/gtk/button.cpp index 807facea1c..2ce3e1d0a1 100644 --- a/src/gtk/button.cpp +++ b/src/gtk/button.cpp @@ -409,9 +409,15 @@ wxButton::State wxButton::GTKGetCurrentState() const void wxButton::GTKUpdateBitmap() { - State state = GTKGetCurrentState(); + // if we don't show bitmaps at all, there is nothing to update + if ( m_bitmaps[State_Normal].IsOk() ) + { + // if we do show them, this will return a state for which we do have a + // valid bitmap + State state = GTKGetCurrentState(); - GTKDoShowBitmap(m_bitmaps[state]); + GTKDoShowBitmap(m_bitmaps[state]); + } } void wxButton::GTKDoShowBitmap(const wxBitmap& bitmap)