mirror of
https://github.com/alliedmodders/metamod-source.git
synced 2025-12-06 18:08:31 +00:00
Add null check in new -game fallback
This commit is contained in:
parent
567084afd4
commit
d6ed4443e8
@ -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)
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user