X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/133cb28b21dc61342da65dcb0addbca9a96b6fe2..b404a8f3b072129c107c6d9a5e0f6f53cd34807b:/src/msw/graphics.cpp?ds=sidebyside 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 }