]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/forty/game.cpp
1. Empty() now doesn't free memory - Clear() does
[wxWidgets.git] / samples / forty / game.cpp
index c121d8dd06e09472d3a61162ed2d1447eb18e612..90bfc194c03908f243c705362832c59c2325cae3 100644 (file)
@@ -288,11 +288,12 @@ void Game::Redraw(wxDC& dc)
 
                // Initialise the card bitmap to the background colour
                wxMemoryDC memoryDC;
-               memoryDC.SelectObject(m_bmapCard);
+               memoryDC.SelectObject(*m_bmapCard);
                memoryDC.SetBrush(FortyApp::BackgroundBrush());
                memoryDC.DrawRectangle(0, 0, CardWidth, CardHeight);
-               memoryDC.SelectObject(m_bmap);
+               memoryDC.SelectObject(*m_bmap);
                memoryDC.DrawRectangle(0, 0, CardWidth, CardHeight);
+               memoryDC.SelectObject(wxNullBitmap);
        }
 }