graphics: Do nothing at Dispose of a subimage

This commit is contained in:
Hajime Hoshi 2019-02-22 00:08:15 +09:00
parent 9595f7ae26
commit 6c47e31f49

View File

@ -634,10 +634,11 @@ func (i *Image) Dispose() error {
if i.isDisposed() {
return nil
}
if !i.isSubImage() {
i.mipmap.dispose()
i.resolvePixelsToSet(false)
if i.isSubImage() {
return nil
}
i.mipmap.dispose()
i.resolvePixelsToSet(false)
runtime.SetFinalizer(i, nil)
return nil
}