gpu: Fix atlas freeing

We need to unset current_atlas if we free that one.
This commit is contained in:
Matthias Clasen
2024-01-19 14:54:54 -05:00
parent 4c6e623ec5
commit ffa5bf1b7d

View File

@@ -173,6 +173,7 @@ static void
gsk_gpu_cached_atlas_free (GskGpuDevice *device,
GskGpuCached *cached)
{
GskGpuDevicePrivate *priv = gsk_gpu_device_get_instance_private (device);
GskGpuCachedAtlas *self = (GskGpuCachedAtlas *) cached;
GskGpuCached *c, *next;
@@ -184,8 +185,11 @@ gsk_gpu_cached_atlas_free (GskGpuDevice *device,
gsk_gpu_cached_free (device, c);
}
if (priv->current_atlas == self)
priv->current_atlas = NULL;
g_object_unref (self->image);
g_free (self);
}