mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 11:18:54 +01:00
graphcis: Bug fix: Evacuating/Restoring pixels must be ignored on a disposed image
This commit is contained in:
parent
18c14f8897
commit
75b7a9134d
6
image.go
6
image.go
@ -324,6 +324,9 @@ func (i *imageImpl) evacuatePixels() error {
|
||||
if i.defaultFramebuffer {
|
||||
return nil
|
||||
}
|
||||
if i.disposed {
|
||||
return nil
|
||||
}
|
||||
if i.evacuated {
|
||||
return errors.New("ebiten: image must not be evacuated")
|
||||
}
|
||||
@ -358,6 +361,9 @@ func (i *imageImpl) restorePixels() error {
|
||||
if i.defaultFramebuffer {
|
||||
return nil
|
||||
}
|
||||
if i.disposed {
|
||||
return nil
|
||||
}
|
||||
if !i.evacuated {
|
||||
return errors.New("ebiten: image must be evacuated")
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user