Fixed hard crash

This commit is contained in:
2023-03-03 23:15:26 -08:00
parent 6e5f151b9a
commit 855ac79095

View File

@ -38,7 +38,7 @@ void TicTacToeGame::onStart() {
useEvent([&](float_t delta) {
// Only allow player input if it's their turn.
if(winner != TIC_TAC_TOE_EMPTY) return;
if(gameOver) return;
Camera *camera = getScene()->findComponent<Camera>();
if(camera == nullptr) return;
@ -96,7 +96,7 @@ void TicTacToeGame::onStart() {
}
// Did game just end?
if(ticTacToeIsGameOver(this->getBoard())) gameOver = true;
gameOver = ticTacToeIsGameOver(this->getBoard());
}, getScene()->eventSceneUpdate);
}