mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-10 23:01:50 +00:00
Fix crash when following symlinks to nonexistent IWAD files
This commit is contained in:
parent
6bc82bdeff
commit
0a30c19138
1 changed files with 6 additions and 0 deletions
|
@ -577,6 +577,12 @@ int FIWadManager::IdentifyVersion (TArray<FString> &wadfiles, const char *iwad,
|
||||||
// -iwad not found or not specified. Revert back to standard behavior.
|
// -iwad not found or not specified. Revert back to standard behavior.
|
||||||
if (mFoundWads.Size() == numFoundWads) iwadparm = nullptr;
|
if (mFoundWads.Size() == numFoundWads) iwadparm = nullptr;
|
||||||
|
|
||||||
|
// Check for symbolic links leading to non-existent files.
|
||||||
|
for (unsigned int i = 0; i < mFoundWads.Size(); i++)
|
||||||
|
{
|
||||||
|
if (!FileExists(mFoundWads[i].mFullPath)) mFoundWads.Delete(i);
|
||||||
|
}
|
||||||
|
|
||||||
// Now check if what got collected actually is an IWAD.
|
// Now check if what got collected actually is an IWAD.
|
||||||
ValidateIWADs();
|
ValidateIWADs();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue