mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-13 12:14:16 +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
|
|
@ -186,6 +186,9 @@ internal class TextureManager : IDisposable, IServiceType, ITextureSubstitutionP
|
||||||
{
|
{
|
||||||
ArgumentNullException.ThrowIfNull(file);
|
ArgumentNullException.ThrowIfNull(file);
|
||||||
|
|
||||||
|
if (!this.im.IsReady)
|
||||||
|
throw new InvalidOperationException("Cannot create textures before scene is ready");
|
||||||
|
|
||||||
#pragma warning disable CS0618
|
#pragma warning disable CS0618
|
||||||
return this.dataManager.GetImGuiTexture(file) as IDalamudTextureWrap;
|
return this.dataManager.GetImGuiTexture(file) as IDalamudTextureWrap;
|
||||||
#pragma warning restore CS0618
|
#pragma warning restore CS0618
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue