mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-26 03:38:55 +01:00
graphics: Bug fix: double disposing
This commit is contained in:
parent
8d258b3c38
commit
854fa6f32c
4
image.go
4
image.go
@ -291,10 +291,6 @@ func (i *imageImpl) restorePixels(context *opengl.Context) error {
|
|||||||
if i.disposed {
|
if i.disposed {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
// TODO: As the texture is already disposed, is it correct to delete it here?
|
|
||||||
if err := i.image.Dispose(); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
if i.pixels != nil {
|
if i.pixels != nil {
|
||||||
img := image.NewRGBA(image.Rect(0, 0, i.width, i.height))
|
img := image.NewRGBA(image.Rect(0, 0, i.width, i.height))
|
||||||
for j := 0; j < i.height; j++ {
|
for j := 0; j < i.height; j++ {
|
||||||
|
Loading…
Reference in New Issue
Block a user