X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/133cb28b21dc61342da65dcb0addbca9a96b6fe2..eea4d01c65f9b29baa1193db762b4c6b8144af24:/src/msw/graphics.cpp diff --git a/src/msw/graphics.cpp b/src/msw/graphics.cpp index 3c8e85fe8a..0bc8226142 100644 --- a/src/msw/graphics.cpp +++ b/src/msw/graphics.cpp @@ -1547,6 +1547,8 @@ void wxGDIPlusContext::PushState() void wxGDIPlusContext::PopState() { + wxCHECK_RET( !m_stateStack.empty(), wxT("No state to pop") ); + GraphicsState state = m_stateStack.top(); m_stateStack.pop(); m_context->Restore(state); @@ -1904,7 +1906,7 @@ void wxGDIPlusRenderer::Unload() if ( m_gditoken ) { GdiplusShutdown(m_gditoken); - m_gditoken = NULL; + m_gditoken = 0; } m_loaded = -1; // next Load() will try again }