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:
Hajime Hoshi 2019-08-15 22:35:24 +09:00
parent 9467a67136
commit 0cbf126b80

View File

@ -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