mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 03:08:54 +01:00
image: Bug fix: isDisposed misimplementation
This commit is contained in:
parent
d2bce0b9c1
commit
eb9379c3a6
5
image.go
5
image.go
@ -162,7 +162,10 @@ func (i *Image) Dispose() error {
|
||||
}
|
||||
|
||||
func (i *Image) isDisposed() bool {
|
||||
return i.texture == nil
|
||||
// i.texture can be nil even when the image is not disposed,
|
||||
// so we need to check if both are nil.
|
||||
// See graphicsContext.setSize function.
|
||||
return i.texture == nil && i.framebuffer == nil
|
||||
}
|
||||
|
||||
// ReplacePixels replaces the pixels of the image with p.
|
||||
|
Loading…
Reference in New Issue
Block a user