We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2967cde commit 61e19a3Copy full SHA for 61e19a3
src/gui/game/GameController.cpp
@@ -233,6 +233,8 @@ GameController::~GameController()
233
void GameController::HistoryRestore()
234
{
235
std::deque<Snapshot*> history = gameModel->GetHistory();
236
+ if (!history.size())
237
+ return;
238
unsigned int historyPosition = gameModel->GetHistoryPosition();
239
unsigned int newHistoryPosition = std::max((int)historyPosition-1, 0);
240
// When undoing, save the current state as a final redo
0 commit comments