Fixed IsMapValid passing blank string to engine's IsMapValid which crashes some games.
This commit is contained in:
parent
a01768525a
commit
5689888682
@ -1180,6 +1180,9 @@ static bool ResolveFuzzyMapName(const char *fuzzyName, char *outFullname, int si
|
|||||||
|
|
||||||
bool CHalfLife2::IsMapValid(const char *map)
|
bool CHalfLife2::IsMapValid(const char *map)
|
||||||
{
|
{
|
||||||
|
if (!map || !map[0])
|
||||||
|
return false;
|
||||||
|
|
||||||
bool ret = engine->IsMapValid(map);
|
bool ret = engine->IsMapValid(map);
|
||||||
#if SOURCE_ENGINE >= SE_LEFT4DEAD
|
#if SOURCE_ENGINE >= SE_LEFT4DEAD
|
||||||
if (!ret)
|
if (!ret)
|
||||||
|
Loading…
Reference in New Issue
Block a user