nullcheck concede action

This commit is contained in:
ebbit1q 2025-09-28 17:53:52 +02:00
parent 5381562a5e
commit 3e00bf96d0

View file

@ -807,9 +807,11 @@ void TabGame::startGame(bool _resuming)
game->getGameMetaInfo()->setStarted(true); game->getGameMetaInfo()->setStarted(true);
static_cast<GameScene *>(gameView->scene())->rearrange(); static_cast<GameScene *>(gameView->scene())->rearrange();
if (aConcede != nullptr) {
aConcede->setText(tr("&Concede")); aConcede->setText(tr("&Concede"));
aConcede->setEnabled(true); aConcede->setEnabled(true);
} }
}
void TabGame::stopGame() void TabGame::stopGame()
{ {
@ -826,9 +828,11 @@ void TabGame::stopGame()
scene->clearViews(); scene->clearViews();
if (aConcede != nullptr) {
aConcede->setText(tr("&Concede")); aConcede->setText(tr("&Concede"));
aConcede->setEnabled(false); aConcede->setEnabled(false);
} }
}
void TabGame::closeGame() void TabGame::closeGame()
{ {