mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-26 03:38:55 +01:00
graphics: Ensure the image is not disposed when restorableImage() is called
This commit is contained in:
parent
caf4e9504f
commit
4b4404bc7e
2
image.go
2
image.go
@ -363,7 +363,7 @@ func (i *Image) restorableImage() *restorable.Image {
|
|||||||
if i.sharedImagePart != nil {
|
if i.sharedImagePart != nil {
|
||||||
return i.sharedImagePart.image()
|
return i.sharedImagePart.image()
|
||||||
}
|
}
|
||||||
return nil
|
panic("not reached")
|
||||||
}
|
}
|
||||||
|
|
||||||
// ReplacePixels replaces the pixels of the image with p.
|
// ReplacePixels replaces the pixels of the image with p.
|
||||||
|
Loading…
Reference in New Issue
Block a user