From: Václav Slavík Date: Sat, 15 Dec 2001 23:18:31 +0000 (+0000) Subject: fix for stupid segfault X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/65d48d095fb1390edd46f682c864320d7b9626e3?hp=c1725ec7f37cb7035e4322217a8679803ae43901 fix for stupid segfault git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13035 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- 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)