Skip to content

Commit

Permalink
Qt: Fix game properties crash opening non-DB game
Browse files Browse the repository at this point in the history
  • Loading branch information
stenzek committed Nov 27, 2024
1 parent 0befbf8 commit d1b904a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/duckstation-qt/gamesummarywidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,9 @@ GameSummaryWidget::GameSummaryWidget(const std::string& path, const std::string&
}

// I hate this so much.
m_ui.customLanguage->addItem(QtUtils::GetIconForLanguage(entry->GetLanguageFlagName(region)),
tr("Show Default Flag"));
const std::string_view default_language =
entry ? entry->GetLanguageFlagName(region) : Settings::GetDiscRegionName(region);
m_ui.customLanguage->addItem(QtUtils::GetIconForLanguage(default_language), tr("Show Default Flag"));
for (u32 i = 0; i < static_cast<u32>(GameDatabase::Language::MaxCount); i++)
{
const char* language_name = GameDatabase::GetLanguageName(static_cast<GameDatabase::Language>(i));
Expand Down

0 comments on commit d1b904a

Please sign in to comment.