Fix last commit, pack can be NULL.

This commit is contained in:
Yamagi Burmeister 2019-01-29 09:41:15 +01:00
parent 5ddab0e4bf
commit 29bb6e5c6c

View file

@ -1438,12 +1438,21 @@ FS_AddDirToSearchPath(char *dir, qboolean create) {
{ {
case PAK: case PAK:
pack = FS_LoadPAK(path); pack = FS_LoadPAK(path);
pack->isProtectedPak = true;
if (pack)
{
pack->isProtectedPak = true;
}
break; break;
case PK3: case PK3:
pack = FS_LoadPK3(path); pack = FS_LoadPK3(path);
pack->isProtectedPak = false;
if (pack)
{
pack->isProtectedPak = false;
}
break; break;
} }