Fix unwanted bitmap disposing
This commit is contained in:
parent
d6fda19d2e
commit
3716a65638
|
@ -106,8 +106,9 @@ namespace BizHawk.Bizware.Graphics
|
|||
switch (gcHandle.Target)
|
||||
{
|
||||
case ImGuiUserTexture userTexture:
|
||||
// avoid disposing our string output bitmap here
|
||||
if (userTexture.Bitmap != _stringOutput)
|
||||
// only dispose anything not cached somewhere
|
||||
if (userTexture.Bitmap != _stringOutput
|
||||
&& !_resourceCache.TextureCache.ContainsKey(userTexture.Bitmap))
|
||||
{
|
||||
userTexture.Bitmap.Dispose();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue