Fix code relating to cookies

This commit is contained in:
2024-09-12 02:42:55 -04:00
parent e08d14135b
commit 2312b48a28
5 changed files with 12 additions and 25 deletions

View File

@@ -505,11 +505,12 @@ func (this *iconSet) MimeIcon (mime data.Mime, size tomo.IconSize) canvas.Textur
}
}
func (this *iconSet) Close () {
func (this *iconSet) Close () error {
if this.atlasSmall != nil {
this.atlasSmall.Close()
}
if this.atlasLarge != nil {
this.atlasLarge.Close()
}
return nil
}

View File

@@ -101,7 +101,7 @@ func (this *iconTheme) MimeIcon (mime data.Mime, size tomo.IconSize) canvas.Text
}
}
func (this *iconTheme) Close () {
func (this *iconTheme) Close () error {
closeAllIn := func (mp map[tomo.Icon] canvas.TextureCloser) {
for _, texture := range mp {
if texture != nil {
@@ -112,6 +112,7 @@ func (this *iconTheme) Close () {
closeAllIn(this.texturesSmall)
closeAllIn(this.texturesMedium)
closeAllIn(this.texturesLarge)
return nil
}
func (this *iconTheme) icon (icon tomo.Icon, size tomo.IconSize) canvas.TextureCloser {