Qt: Fix crash opening ELF game properties

Introduced in 9da8e9280f
This commit is contained in:
Connor McLaughlin 2022-12-12 23:54:13 +10:00 committed by refractionpcsx2
parent fa2db10e44
commit 60fe05bc63
1 changed files with 1 additions and 1 deletions

View File

@ -85,7 +85,7 @@ void GameSummaryWidget::populateDiscPath(const GameList::Entry* entry)
if (entry->type == GameList::EntryType::ELF)
{
std::optional<std::string> iso_path(m_dialog->getStringValue("EmuCore", "DiscPath", std::nullopt));
if (!iso_path->empty())
if (iso_path.has_value() && !iso_path->empty())
m_ui.discPath->setText(QString::fromStdString(iso_path.value()));
connect(m_ui.discPath, &QLineEdit::textChanged, this, &GameSummaryWidget::onDiscPathChanged);