glarea: Always delete textures on unrealize

We need to make the context current for deleting
textures as well, so just do it unconditionally.
This commit is contained in:
Matthias Clasen 2018-01-17 19:49:05 -05:00
parent 6ea827cde5
commit 0429008b16

View File

@ -623,13 +623,9 @@ gtk_gl_area_unrealize (GtkWidget *widget)
if (priv->context != NULL)
{
if (priv->have_buffers)
{
gtk_gl_area_make_current (area);
gtk_gl_area_delete_buffers (area);
}
gtk_gl_area_delete_textures (area);
gtk_gl_area_make_current (area);
gtk_gl_area_delete_buffers (area);
gtk_gl_area_delete_textures (area);
/* Make sure to unset the context if current */
if (priv->context == gdk_gl_context_get_current ())