Skip to content

Commit

Permalink
RMG: add nullptr check to CreateNetplaySessionDialog::accept()
Browse files Browse the repository at this point in the history
  • Loading branch information
Rosalie241 committed Dec 25, 2024
1 parent 7c76e8c commit 48e21f1
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,12 @@ void CreateNetplaySessionDialog::accept()
QPushButton* createButton = this->buttonBox->button(QDialogButtonBox::Ok);
createButton->setEnabled(false);

QListWidgetItem* item = this->listWidget->currentItem();
QListWidgetItem* item = this->listWidget->currentItem();
if (item == nullptr)
{
return;
}

NetplayRomData_t romData = item->data(Qt::UserRole).value<NetplayRomData_t>();

this->sessionFile = romData.File;
Expand Down

0 comments on commit 48e21f1

Please sign in to comment.