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

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