Fix the crash bug introduced by 7688fdc94f

Fixes #7556
This commit is contained in:
Marek Roszko 2021-02-16 07:30:58 -05:00
parent 14cba9723f
commit 572ba8984a
1 changed files with 1 additions and 1 deletions

View File

@ -268,7 +268,7 @@ public:
{
// Horrific hack, but it's a crash bug. Don't let inter-frame commands stack up
// waiting to be processed.
if( aEvent.IsSimulator() && m_eventQueue.back().IsSimulator() )
if( aEvent.IsSimulator() && m_eventQueue.size() > 0 && m_eventQueue.back().IsSimulator() )
m_eventQueue.pop_back();
m_eventQueue.push_back( aEvent );