X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3498362ed5759522a9664a70e4da819e51bd2fbe..333e57d578e9e0fb6555452b5a53698ffd85ee69:/include/wx/gtk/dcmemory.h diff --git a/include/wx/gtk/dcmemory.h b/include/wx/gtk/dcmemory.h index 94de61a1f3..a0fb9d6c23 100644 --- a/include/wx/gtk/dcmemory.h +++ b/include/wx/gtk/dcmemory.h @@ -35,14 +35,17 @@ public: virtual void SetTextBackground( const wxColour &col ); // implementation - virtual wxBitmap GetSelectedBitmap() const { return m_selected; } + wxBitmap GetSelectedBitmap() const { return m_selected; } wxBitmap m_selected; protected: void DoGetSize( int *width, int *height ) const; virtual void DoSelect(const wxBitmap& bitmap); - virtual wxBitmap DoGetAsBitmap(const wxRect *subrect) const - { return subrect == NULL ? GetSelectedBitmap() : GetSelectedBitmap().GetSubBitmap(*subrect); } + virtual wxBitmap DoGetAsBitmap(const wxRect *subrect) const + { + wxBitmap bmp = GetSelectedBitmap(); + return subrect ? bmp.GetSubBitmap(*subrect) : bmp; + } private: void Init();