forked from AuroraMiddleware/gtk
glarea: Avoid a crash
We must only delete the texture if it is not NULL.
This commit is contained in:
parent
cdb2fcb554
commit
6ea827cde5
@ -601,8 +601,11 @@ gtk_gl_area_delete_textures (GtkGLArea *area)
|
||||
{
|
||||
GtkGLAreaPrivate *priv = gtk_gl_area_get_instance_private (area);
|
||||
|
||||
delete_one_texture (priv->texture);
|
||||
priv->texture = NULL;
|
||||
if (priv->texture)
|
||||
{
|
||||
delete_one_texture (priv->texture);
|
||||
priv->texture = NULL;
|
||||
}
|
||||
|
||||
/* FIXME: we need to explicitly release all outstanding
|
||||
* textures here, otherwise release_texture will get called
|
||||
|
Loading…
Reference in New Issue
Block a user