mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-12 12:08:58 +01:00
restorable: Set nil to the image after disposing
This prevents a bug that a disposed image is used by clearImage.
This commit is contained in:
parent
9467a67136
commit
0cbf126b80
@ -479,6 +479,7 @@ func (i *Image) restore() {
|
|||||||
|
|
||||||
// Dispose the internal image after getting its size for safety.
|
// Dispose the internal image after getting its size for safety.
|
||||||
i.image.Dispose()
|
i.image.Dispose()
|
||||||
|
i.image = nil
|
||||||
|
|
||||||
if i.screen {
|
if i.screen {
|
||||||
// The screen image should also be recreated because framebuffer might
|
// The screen image should also be recreated because framebuffer might
|
||||||
|
Loading…
Reference in New Issue
Block a user