summaryrefslogtreecommitdiff
path: root/src/StardewModdingAPI
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <github@jplamondonw.com>2017-05-26 00:33:32 -0400
committerJesse Plamondon-Willard <github@jplamondonw.com>2017-05-26 00:33:32 -0400
commit395925ad2b82e3c73dc3ecbb6b5533f46ec76ab8 (patch)
tree122ae316bf168611246a90d248aa79590841471c /src/StardewModdingAPI
parent569ae2b87b10bcef1088b51a33a3f3d5734d60df (diff)
downloadSMAPI-395925ad2b82e3c73dc3ecbb6b5533f46ec76ab8.tar.gz
SMAPI-395925ad2b82e3c73dc3ecbb6b5533f46ec76ab8.tar.bz2
SMAPI-395925ad2b82e3c73dc3ecbb6b5533f46ec76ab8.zip
fix errors handling dependencies if some mods have no manifest
Diffstat (limited to 'src/StardewModdingAPI')
-rw-r--r--src/StardewModdingAPI/Framework/ModLoading/ModResolver.cs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/StardewModdingAPI/Framework/ModLoading/ModResolver.cs b/src/StardewModdingAPI/Framework/ModLoading/ModResolver.cs
index 21aebeb1..f5139ce5 100644
--- a/src/StardewModdingAPI/Framework/ModLoading/ModResolver.cs
+++ b/src/StardewModdingAPI/Framework/ModLoading/ModResolver.cs
@@ -141,7 +141,7 @@ namespace StardewModdingAPI.Framework.ModLoading
states[mod] = ModDependencyStatus.Failed;
sortedMods.Push(mod);
}
-
+
// sort mods
foreach (IModMetadata mod in mods)
this.ProcessDependencies(mods.ToArray(), mod, states, sortedMods, new List<IModMetadata>());
@@ -198,7 +198,7 @@ namespace StardewModdingAPI.Framework.ModLoading
string[] missingModIDs =
(
from dependency in mod.Manifest.Dependencies
- where mods.All(m => m.Manifest.UniqueID != dependency.UniqueID)
+ where mods.All(m => m.Manifest?.UniqueID != dependency.UniqueID)
orderby dependency.UniqueID
select dependency.UniqueID
)
@@ -219,7 +219,7 @@ namespace StardewModdingAPI.Framework.ModLoading
IModMetadata[] modsToLoadFirst =
(
from other in mods
- where mod.Manifest.Dependencies.Any(required => required.UniqueID == other.Manifest.UniqueID)
+ where mod.Manifest.Dependencies.Any(required => required.UniqueID == other.Manifest?.UniqueID)
select other
)
.ToArray();