From a1e953f40936c9e52292fd06cb9b80fd66bf5e43 Mon Sep 17 00:00:00 2001 From: Chris Bessent Date: Mon, 22 Nov 2021 17:02:07 -0700 Subject: Don't add invalid games to the "visit Nexus" list --- src/nexusinterface.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/nexusinterface.cpp') diff --git a/src/nexusinterface.cpp b/src/nexusinterface.cpp index 1364d7e1..2e4496e1 100644 --- a/src/nexusinterface.cpp +++ b/src/nexusinterface.cpp @@ -371,7 +371,13 @@ QString NexusInterface::getGameURL(QString gameName) const { IPluginGame *game = getGame(gameName); if (game != nullptr) { - return "https://www.nexusmods.com/" + game->gameNexusName().toLower(); + QString gameNexusName = game->gameNexusName().toLower(); + if (gameNexusName.isEmpty()) { + return ""; + } + else { + return "https://www.nexusmods.com/" + gameNexusName; + } } else { log::error("getGameURL can't find plugin for {}", gameName); return ""; -- cgit v1.3.1