mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
graphics: Do nothing at Dispose of a subimage
This commit is contained in:
parent
9595f7ae26
commit
6c47e31f49
5
image.go
5
image.go
@ -634,10 +634,11 @@ func (i *Image) Dispose() error {
|
|||||||
if i.isDisposed() {
|
if i.isDisposed() {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
if !i.isSubImage() {
|
if i.isSubImage() {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
i.mipmap.dispose()
|
i.mipmap.dispose()
|
||||||
i.resolvePixelsToSet(false)
|
i.resolvePixelsToSet(false)
|
||||||
}
|
|
||||||
runtime.SetFinalizer(i, nil)
|
runtime.SetFinalizer(i, nil)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user