Skip to content

Commit 98643f7

Browse files
committed
Safety checks.
1 parent e276e8e commit 98643f7

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

xivModdingFramework/Helpers/IOUtil.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -874,6 +874,7 @@ private static int FloorPower2(int x)
874874

875875
public static async Task CompressWindowsDirectory(string dir)
876876
{
877+
if (!Directory.Exists(dir)) return;
877878
try
878879
{
879880
var wrappedDir = Regex.Replace(dir, @"(\\*)" + "\"", @"$1$1\" + "\"");

xivModdingFramework/Mods/WizardData.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1079,7 +1079,7 @@ public static async Task<WizardData> FromPmp(PMPJson pmp, string unzipPath)
10791079
var def = pmp.DefaultMod as PmpStandardOptionJson;
10801080
if (def != null)
10811081
{
1082-
var anyData = def.Manipulations.Count > 0 || def.FileSwaps.Count > 0 || def.Files.Count > 0;
1082+
var anyData = (def.Manipulations != null && def.Manipulations.Count > 0) || def.FileSwaps.Count > 0 || def.Files.Count > 0;
10831083
if (anyData)
10841084
{
10851085
// Just drum up a basic group containing the default option.

0 commit comments

Comments
 (0)