X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/41fbc84101e7fc1a3e658f1d3f01664289637f01..196cc38b26fb577274d307ba664dbc5a3196f301:/src/gtk1/dcmemory.cpp?ds=sidebyside diff --git a/src/gtk1/dcmemory.cpp b/src/gtk1/dcmemory.cpp index 27dd0e8e9d..a1e0c24452 100644 --- a/src/gtk1/dcmemory.cpp +++ b/src/gtk1/dcmemory.cpp @@ -43,6 +43,7 @@ wxMemoryDC::~wxMemoryDC() void wxMemoryDC::SelectObject( const wxBitmap& bitmap ) { + Destroy(); m_selected = bitmap; if (m_selected.Ok()) { @@ -55,9 +56,9 @@ void wxMemoryDC::SelectObject( const wxBitmap& bitmap ) m_window = m_selected.GetBitmap(); } - SetUpDC(); - m_isMemDC = TRUE; + + SetUpDC(); } else {