Skip to content

Commit 48e5e94

Browse files
committed
Merge remote-tracking branch 'leumasme/fix-minesweeper-crash' into dev
2 parents 44234fe + 0c4d834 commit 48e5e94

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/main/java/ru/timeconqueror/lootgames/minigame/minesweeper/GameMineSweeper.java

+4
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,10 @@ public void revealField(EntityPlayerMP player, Pos2i pos) {
319319

320320
save();
321321

322+
// If another revealField call within revealAllNeighbors already ran the win check,
323+
// the board might already be reset
324+
if (!board.isGenerated()) return;
325+
322326
if (board.checkWin()) {
323327
onLevelSuccessfullyFinished();
324328
}

0 commit comments

Comments
 (0)