fix(PluginImageCache): throw when assets fail to load

This commit is contained in:
goat 2022-01-26 02:44:30 +01:00
parent ff20d81d79
commit 89240c0e1e
No known key found for this signature in database
GPG key ID: 7773BB5B43BA52E5

View file

@ -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();
}