Added a check that sexprs isn't empty before popping

This fixes a crash on malformed sexprs in the DRC rules panel
This commit is contained in:
Ben Ellis 2020-07-21 14:52:48 +00:00 committed by Seth Hillbrand
parent 9a801d8b72
commit 42a2f13464
1 changed files with 3 additions and 1 deletions

View File

@ -114,7 +114,9 @@ void PANEL_SETUP_RULES::onScintillaCharAdded( wxStyledTextEvent &aEvent )
} }
else if( c == ')' ) else if( c == ')' )
{ {
sexprs.pop(); if( !sexprs.empty() )
sexprs.pop();
context = NONE; context = NONE;
} }
else if( c == ' ' ) else if( c == ' ' )