[GameInformation] Check for existence of room for create as judge checkbox (#6398)

This commit is contained in:
BruebachL 2025-12-05 17:26:35 +01:00 committed by GitHub
parent 0a239712dd
commit edb0a954e2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -109,7 +109,7 @@ void DlgCreateGame::sharedCtor()
gameSetupOptionsLayout->addWidget(startingLifeTotalLabel, 0, 0);
gameSetupOptionsLayout->addWidget(startingLifeTotalEdit, 0, 1);
gameSetupOptionsLayout->addWidget(shareDecklistsOnLoadCheckBox, 1, 0);
if (room->getUserInfo()->user_level() & ServerInfo_User::IsJudge) {
if (room && room->getUserInfo()->user_level() & ServerInfo_User::IsJudge) {
gameSetupOptionsLayout->addWidget(createGameAsJudgeCheckBox, 2, 0);
} else {
createGameAsJudgeCheckBox->setChecked(false);