Using PopState() without a previous PushState() is an error but it shouldn't
result in a crash, so add an assert guarding against it.
Closes #13197.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68344
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
void wxGDIPlusContext::PopState()
{
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);
GraphicsState state = m_stateStack.top();
m_stateStack.pop();
m_context->Restore(state);