src: fixed redo crash

* fixed crash when redoing the last action on redostack
This commit is contained in:
malte_langkabel
2016-04-19 16:40:49 +02:00
parent 661dbd844c
commit 6069dfedc1
@@ -158,7 +158,7 @@ void UndoRedoController::handleMessage(MessageRedo* message)
std::list<Command>::iterator oldIterator = m_iterator;
std::advance(m_iterator, 1);
while (m_iterator->order == Command::ORDER_VIEW)
while (m_iterator != m_list.end() && m_iterator->order == Command::ORDER_VIEW)
{
std::advance(m_iterator, 1);
}