Skip to content

Commit 31ad25b

Browse files
committed
Notifying on extra weird error cases.
1 parent 12dec77 commit 31ad25b

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

xivModdingFramework/Mods/Modding.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,14 @@ static Modding()
7979

8080
public static bool ValidateModlist(string ffxivDirectory = null)
8181
{
82+
if(ffxivDirectory == null &&
83+
(XivCache.GameInfo == null
84+
|| XivCache.GameInfo.GameDirectory == null
85+
|| string.IsNullOrWhiteSpace(XivCache.GameInfo.GameDirectory.FullName)))
86+
{
87+
throw new InvalidDataException("Cannot validate modlist for NULL directory.");
88+
}
89+
8290
var dir = string.IsNullOrEmpty(ffxivDirectory) ? XivCache.GameInfo.GameDirectory.FullName : ffxivDirectory;
8391
dir = new DirectoryInfo(dir).Parent.Parent.FullName;
8492

0 commit comments

Comments
 (0)