]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk1/dcmemory.cpp
implemented dummy wxPalette for wxGTK, so that it no longer pops up assertion failure...
[wxWidgets.git] / src / gtk1 / dcmemory.cpp
index 27dd0e8e9d531d44ebde4e5f1da27bddabe10d28..a1e0c244522876fd6e6ce37b46803511e5f8f31a 100644 (file)
@@ -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
     {