diff --git a/ModelDownloader/HarmonyPatches/Patches/AnimatorControllerPatch.cs b/ModelDownloader/HarmonyPatches/Patches/AnimatorControllerPatch.cs index ecd9866..1578906 100644 --- a/ModelDownloader/HarmonyPatches/Patches/AnimatorControllerPatch.cs +++ b/ModelDownloader/HarmonyPatches/Patches/AnimatorControllerPatch.cs @@ -13,13 +13,13 @@ internal class AnimatorControllerPatch { private static void Prefix(AnimationControllerData __instance) { - if (__instance.sprite.name.StartsWith("ModelDownloaderAnimation")) + if (__instance != null && __instance.sprite != null && __instance.activeImages != null && __instance.sprite.name.StartsWith("ModelDownloaderAnimation")) { var newImageList = new List(); - - foreach (var activeImage in __instance.activeImages) + for (int i = 0; i < __instance.activeImages.Count; i++) { - if (__instance.sprites.Contains(activeImage.sprite)) newImageList.Add(activeImage); + var activeImage = __instance.activeImages[i]; + if (activeImage && __instance.sprites.Contains(activeImage.sprite)) newImageList.Add(activeImage); } __instance.activeImages = newImageList; } diff --git a/ModelDownloader/Properties/AssemblyInfo.cs b/ModelDownloader/Properties/AssemblyInfo.cs index 4e78b5a..07a5125 100644 --- a/ModelDownloader/Properties/AssemblyInfo.cs +++ b/ModelDownloader/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.1.0")] -[assembly: AssemblyFileVersion("1.1.0")] +[assembly: AssemblyVersion("1.1.1")] +[assembly: AssemblyFileVersion("1.1.1")] diff --git a/ModelDownloader/Settings/UI/ModelDetailViewController.cs b/ModelDownloader/Settings/UI/ModelDetailViewController.cs index 856408c..513fe7d 100644 --- a/ModelDownloader/Settings/UI/ModelDetailViewController.cs +++ b/ModelDownloader/Settings/UI/ModelDetailViewController.cs @@ -123,7 +123,7 @@ internal void Initialize(ModelsaberEntry model, Sprite cover) { DownloadInteractable = !DownloadUtils.CheckIfModelInstalled(model); PreviewInteractible = !DownloadUtils.CheckIfModelInstalled(model) && (model.Type != "platform" && model.Type != "avatar"); - Plugin.Log.Info(_pluginConfig.AutomaticallyGeneratePreviews.ToString()); + // Plugin.Log.Info(_pluginConfig.AutomaticallyGeneratePreviews.ToString()); if (_pluginConfig.AutomaticallyGeneratePreviews && PreviewInteractible) PreviewPressed(); } diff --git a/ModelDownloader/manifest.json b/ModelDownloader/manifest.json index 942c3f6..2254fe2 100644 --- a/ModelDownloader/manifest.json +++ b/ModelDownloader/manifest.json @@ -3,7 +3,7 @@ "id": "ModelDownloader", "name": "ModelDownloader", "author": "Bobbie", - "version": "1.1.0", + "version": "1.1.1", "description": "A PC Beat Saber mod that allows you to download Sabers, Notes, Platforms, and Avatars directly from ModelSaber, all from a convenient window within your game.", "gameVersion": "1.15.0", "dependsOn": {