summaryrefslogtreecommitdiff
path: root/src/mainwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainwindow.cpp')
-rw-r--r--src/mainwindow.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index bb5cd337..a30fdaac 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -4871,7 +4871,11 @@ void MainWindow::on_actionSettings_triggered()
void MainWindow::on_actionNexus_triggered()
{
- QDesktopServices::openUrl(QUrl(NexusInterface::instance(&m_PluginContainer)->getGameURL(m_OrganizerCore.managedGame()->gameShortName())));
+ const IPluginGame *game = m_OrganizerCore.managedGame();
+ QString gameName = game->gameShortName();
+ if (game->gameNexusName().isEmpty() && game->primarySources().count())
+ gameName = game->primarySources()[0];
+ QDesktopServices::openUrl(QUrl(NexusInterface::instance(&m_PluginContainer)->getGameURL(gameName)));
}