Skip to content

Commit 5ea720c

Browse files
committed
rogueviz:: crystal-sokoban:: fixed a crash when undoing in an empty history
1 parent 3133439 commit 5ea720c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

rogueviz/crystal-sokoban.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ void save_undo() {
115115
}
116116

117117
void restore_undo() {
118+
if(undos.empty()) return;
118119
undos.pop_back();
119120
auto& u = undos.back();
120121
cwt.at = u.where;

0 commit comments

Comments
 (0)