X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/888dde65f43d5f57e8fb2028b27191cca1741403..ada175836e7b9e456b7f32d82bfb5f6b21d5608d:/src/gtk/dcmemory.cpp

diff --git a/src/gtk/dcmemory.cpp b/src/gtk/dcmemory.cpp
index 2a0d2687cb..4590917127 100644
--- a/src/gtk/dcmemory.cpp
+++ b/src/gtk/dcmemory.cpp
@@ -22,17 +22,17 @@
 
 IMPLEMENT_ABSTRACT_CLASS(wxMemoryDCImpl, wxWindowDCImpl)
 
-wxMemoryDCImpl::wxMemoryDCImpl( wxMemoryDC *owner ) 
+wxMemoryDCImpl::wxMemoryDCImpl( wxMemoryDC *owner )
   : wxWindowDCImpl( owner )
-{ 
-    Init(); 
+{
+    Init();
 }
 
-wxMemoryDCImpl::wxMemoryDCImpl( wxMemoryDC *owner, wxBitmap& bitmap) 
+wxMemoryDCImpl::wxMemoryDCImpl( wxMemoryDC *owner, wxBitmap& bitmap)
   : wxWindowDCImpl( owner )
-{ 
-    Init(); 
-    owner->SelectObject(bitmap); 
+{
+    Init();
+    DoSelect(bitmap);
 }
 
 wxMemoryDCImpl::wxMemoryDCImpl( wxMemoryDC *owner, wxDC *WXUNUSED(dc) )
@@ -76,7 +76,7 @@ void wxMemoryDCImpl::DoSelect( const wxBitmap& bitmap )
     else
     {
         m_ok = false;
-        m_gdkwindow = (GdkWindow *) NULL;
+        m_gdkwindow = NULL;
     }
 }