mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +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.
|
||||
i.image.Dispose()
|
||||
i.image = nil
|
||||
|
||||
if i.screen {
|
||||
// The screen image should also be recreated because framebuffer might
|
||||
|
Loading…
Reference in New Issue
Block a user