mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-23 17:09:17 +01:00
chore: throw if TextureManagerTextureWrap is used beyond disposal
This commit is contained in:
parent
dc95d7e8de
commit
39e389080c
1 changed files with 3 additions and 1 deletions
|
|
@ -574,7 +574,9 @@ internal class TextureManagerTextureWrap : IDalamudTextureWrap
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <inheritdoc/>
|
/// <inheritdoc/>
|
||||||
public IntPtr ImGuiHandle => this.manager.GetInfo(this.path).Wrap!.ImGuiHandle;
|
public IntPtr ImGuiHandle => !this.IsDisposed ?
|
||||||
|
this.manager.GetInfo(this.path).Wrap!.ImGuiHandle :
|
||||||
|
throw new InvalidOperationException("Texture already disposed. You may not render it.");
|
||||||
|
|
||||||
/// <inheritdoc/>
|
/// <inheritdoc/>
|
||||||
public int Width { get; private set; }
|
public int Width { get; private set; }
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue