graphics: Bug fix: double disposing

This commit is contained in:
Hajime Hoshi 2016-06-12 23:13:41 +09:00
parent 8d258b3c38
commit 854fa6f32c

View File

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