mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 03:08:54 +01:00
internal/ui: bug fix: crash when Image.MarkDisposed is called multiple times
Closes #2048
This commit is contained in:
parent
651c5693c6
commit
b52a02a178
@ -52,6 +52,9 @@ func newScreenFramebufferImage(width, height int) *Image {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (i *Image) MarkDisposed() {
|
func (i *Image) MarkDisposed() {
|
||||||
|
if i.mipmap == nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
i.mipmap.MarkDisposed()
|
i.mipmap.MarkDisposed()
|
||||||
i.mipmap = nil
|
i.mipmap = nil
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user