mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 18:27:23 +01:00
fix: check for null InternalName
This commit is contained in:
parent
83c16146aa
commit
bffb556f0c
2 changed files with 14 additions and 1 deletions
|
|
@ -228,13 +228,20 @@ internal class PluginImageCache : IDisposable, IServiceType
|
|||
/// <returns>True if an entry exists, may be null if currently downloading.</returns>
|
||||
public bool TryGetIcon(LocalPlugin? plugin, PluginManifest manifest, bool isThirdParty, out TextureWrap? iconTexture)
|
||||
{
|
||||
iconTexture = null;
|
||||
|
||||
if (manifest == null || manifest.InternalName == null)
|
||||
{
|
||||
Log.Error("THIS SHOULD NEVER HAPPEN! manifest == null || manifest.InternalName == null");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!this.pluginIconMap.TryAdd(manifest.InternalName, null))
|
||||
{
|
||||
iconTexture = this.pluginIconMap[manifest.InternalName];
|
||||
return true;
|
||||
}
|
||||
|
||||
iconTexture = null;
|
||||
var requestedFrame = Service<DalamudInterface>.GetNullable()?.FrameCount ?? 0;
|
||||
Task.Run(async () =>
|
||||
{
|
||||
|
|
|
|||
|
|
@ -838,6 +838,12 @@ Thanks and have fun!";
|
|||
|
||||
LocalPlugin plugin;
|
||||
|
||||
if (manifest != null && manifest.InternalName == null)
|
||||
{
|
||||
Log.Error("{FileName}: Your manifest has no internal name set! Can't load this.", dllFile.FullName);
|
||||
throw new Exception("No internal name");
|
||||
}
|
||||
|
||||
if (isDev)
|
||||
{
|
||||
Log.Information($"Loading dev plugin {name}");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue