check for index file existence.

not really necessary, just a shortcut to avoid exception thrown later
on.
This commit is contained in:
morkt 2016-11-13 16:18:23 +04:00
parent 1797f5151f
commit b333119148

View File

@ -103,6 +103,8 @@ namespace GameRes.Formats.Cyberworks
var toc_name = toc_name_builder.ToString(); var toc_name = toc_name_builder.ToString();
toc_name = VFS.CombinePath (VFS.GetDirectoryName (file.Name), toc_name); toc_name = VFS.CombinePath (VFS.GetDirectoryName (file.Name), toc_name);
if (!VFS.FileExists (toc_name))
return null;
var toc = ReadToc (toc_name); var toc = ReadToc (toc_name);
if (null == toc) if (null == toc)
return null; return null;