Fixed crash on loading directories

This commit is contained in:
alexey.lysiuk 2018-03-12 11:00:40 +02:00
parent 1f6e201bf1
commit e0f7c99496

View file

@ -1363,7 +1363,10 @@ FileReader *FWadCollection::GetFileReader(int wadnum)
{
return NULL;
}
return Files[wadnum]->GetReader();
// Return reader for real files only and nullptr otherwise
FileReader* const reader = Files[wadnum]->GetReader();
return reader->isOpen() ? reader : nullptr;
}
//==========================================================================