Add null check in new -game fallback

This commit is contained in:
Nicholas Hastings 2025-02-21 08:11:13 -05:00
parent 567084afd4
commit d6ed4443e8

View File

@ -224,6 +224,8 @@ mm_GetGameName(char *buffer, size_t size)
// we can't even set MM:S path with GameBin instead of Game, the first Game path will always be MM:S's
// location, rather than the real Game dir
char *pszAppId = std::getenv("SteamAppId");
if (pszAppId)
{
switch (strtoul(pszAppId, nullptr, 10))
{
case 570ul:
@ -237,6 +239,7 @@ mm_GetGameName(char *buffer, size_t size)
break;
}
}
}
if (buffer[0] == 0)
{