diff --git a/src/dumper/dumper.cs b/src/dumper/dumper.cs index 4eefae6..1251e34 100644 --- a/src/dumper/dumper.cs +++ b/src/dumper/dumper.cs @@ -263,6 +263,8 @@ class Dumper private void ExportIcon(string assetPath, string outPath) { + if (_provider == null) throw new InvalidOperationException("Attempted to export icon when dumper was not initialized/invalid"); + string cleanPath = assetPath.Contains('.') ? assetPath[..assetPath.LastIndexOf('.')] : assetPath; string fileName = Path.GetFileName(cleanPath) + ".png"; string relativeOutPath = outPath.TrimStart('/', '\\'); @@ -273,7 +275,6 @@ class Dumper if (File.Exists(fullPath)) return; - if (_provider == null) return; // special thanks to whichever dev kept fucking up the casing if (!_provider.TryLoadPackage(cleanPath, out IPackage? package)) {