From 65d48d095fb1390edd46f682c864320d7b9626e3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Sat, 15 Dec 2001 23:18:31 +0000 Subject: [PATCH] fix for stupid segfault git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13035 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/mgl/dcmemory.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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) -- 2.45.2