From ac4de069215bacaca1caec9c1d2bae476616e89b Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Sat, 24 Nov 2001 23:59:22 +0000 Subject: [PATCH] fool-proof wxDC::SetPalette(wxNullPalette) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12658 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/mgl/dc.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mgl/dc.cpp b/src/mgl/dc.cpp index 692ac021d4..2c48b7f256 100644 --- a/src/mgl/dc.cpp +++ b/src/mgl/dc.cpp @@ -1097,7 +1097,8 @@ void wxDC::SetPalette(const wxPalette& palette) if ( palette == wxNullPalette ) { - SetPalette(m_oldPalette); + if ( m_oldPalette.Ok() ) + SetPalette(m_oldPalette); return; } -- 2.45.2