Don't try to pop from an empty stack in wxGDIPlusContext::PopState().
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
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user