X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8f7b34a878bbcb2f71a0c7694e2a3bec51460218..5541d1fda4b73af86e42b2f43724f0c063a352d0:/src/mgl/dcmemory.cpp diff --git a/src/mgl/dcmemory.cpp b/src/mgl/dcmemory.cpp index a4afbacd2b..c8818c2242 100644 --- a/src/mgl/dcmemory.cpp +++ b/src/mgl/dcmemory.cpp @@ -44,11 +44,11 @@ wxMemoryDC::~wxMemoryDC() void wxMemoryDC::SelectObject(const wxBitmap& bitmap) { - SetMGLDC(NULL, TRUE); - m_selected = bitmap; - if ( bitmap.Ok() ) + { + m_selected = bitmap; SetMGLDC(m_selected.CreateTmpDC(), TRUE); + } } void wxMemoryDC::SetPen(const wxPen &pen)