Use the new api to release resources

When we unrealize a GL area with outstanding textures,
call gdk_texture_release_gl on them to avoid later crashes.
This commit is contained in:
Matthias Clasen 2018-01-17 20:19:19 -05:00
parent 5e302ae2cc
commit 47b7bfd2ba

View File

@ -385,11 +385,15 @@ delete_one_texture (gpointer data)
{
Texture *texture = data;
if (texture->holder)
gdk_texture_release_gl (texture->holder);
if (texture->id != 0)
{
glDeleteTextures (1, &texture->id);
texture->id = 0;
}
g_free (texture);
}