mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
graphicsdriver/metal: Do not release a nil texture (screen)
This commit is contained in:
parent
6c47e31f49
commit
f19d7a29b8
@ -698,7 +698,10 @@ func (i *Image) viewportSize() (int, int) {
|
||||
|
||||
func (i *Image) Dispose() {
|
||||
mainthread.Run(func() error {
|
||||
i.texture.Release()
|
||||
if i.texture != (mtl.Texture{}) {
|
||||
i.texture.Release()
|
||||
i.texture = mtl.Texture{}
|
||||
}
|
||||
return nil
|
||||
})
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user