mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 18:27:23 +01:00
fix: throw if IM is not ready
This commit is contained in:
parent
2a9409a242
commit
1df2ccfb1a
1 changed files with 3 additions and 0 deletions
|
|
@ -185,6 +185,9 @@ internal class TextureManager : IDisposable, IServiceType, ITextureSubstitutionP
|
|||
public IDalamudTextureWrap? GetTexture(TexFile file)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(file);
|
||||
|
||||
if (!this.im.IsReady)
|
||||
throw new InvalidOperationException("Cannot create textures before scene is ready");
|
||||
|
||||
#pragma warning disable CS0618
|
||||
return this.dataManager.GetImGuiTexture(file) as IDalamudTextureWrap;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue