]> git.saurik.com Git - wxWidgets.git/blobdiff - src/univ/renderer.cpp
Fixed a crash when GetMonthControl returns NULL
[wxWidgets.git] / src / univ / renderer.cpp
index 3d55a23cfba47ad6dc7a9c9720486d4cf7767a21..13db530ddb9e79476de7535b64d37812e1a1d76e 100644 (file)
@@ -468,7 +468,8 @@ void wxControlRenderer::DrawButtonBorder()
 
     m_renderer->DrawButtonBorder(m_dc, m_rect, flags, &m_rect);
 
-    m_renderer->DrawBackground(m_dc, wxTHEME_BG_COLOUR(m_window), m_rect, flags);
+    // Why do this here?
+    // m_renderer->DrawButtonSurface(m_dc, wxTHEME_BG_COLOUR(m_window), m_rect, flags );
 }
 
 void wxControlRenderer::DrawBitmap(const wxBitmap& bitmap)
@@ -511,7 +512,7 @@ void wxControlRenderer::DrawBitmap(wxDC &dc,
     else if ( stretch & wxEXPAND )
     {
         // stretch bitmap to fill the entire control
-        bmp = wxImage(bmp.ConvertToImage()).Scale(rect.width, rect.height);
+        bmp = wxBitmap(wxImage(bmp.ConvertToImage()).Scale(rect.width, rect.height));
     }
     else // not stretched, not tiled
     {