From 89240c0e1e8dc7a34c5cfcf16bce60e301c25551 Mon Sep 17 00:00:00 2001 From: goat <16760685+goaaats@users.noreply.github.com> Date: Wed, 26 Jan 2022 02:44:30 +0100 Subject: [PATCH] fix(PluginImageCache): throw when assets fail to load --- Dalamud/Interface/Internal/Windows/PluginImageCache.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Dalamud/Interface/Internal/Windows/PluginImageCache.cs b/Dalamud/Interface/Internal/Windows/PluginImageCache.cs index c00bb12b4..834c60cf4 100644 --- a/Dalamud/Interface/Internal/Windows/PluginImageCache.cs +++ b/Dalamud/Interface/Internal/Windows/PluginImageCache.cs @@ -65,6 +65,12 @@ namespace Dalamud.Interface.Internal.Windows this.ThirdIcon = interfaceManager.LoadImage(Path.Combine(dalamud.AssetDirectory.FullName, "UIRes", "thirdIcon.png"))!; this.ThirdInstalledIcon = interfaceManager.LoadImage(Path.Combine(dalamud.AssetDirectory.FullName, "UIRes", "thirdInstalledIcon.png"))!; + if (this.DefaultIcon == null || this.TroubleIcon == null || this.UpdateIcon == null || this.InstalledIcon == null || + this.ThirdIcon == null || this.ThirdInstalledIcon == null) + { + throw new Exception("Plugin overlay images could not be loaded."); + } + this.downloadThread = new Thread(this.DownloadTask); this.downloadThread.Start(); }