X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8f7b34a878bbcb2f71a0c7694e2a3bec51460218..8dce54c9e632e0abd820498346e90aff0ae45d70:/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)