[gtk+] glarea: Avoid a crash
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] glarea: Avoid a crash
- Date: Thu, 18 Jan 2018 00:51:12 +0000 (UTC)
commit 6ea827cde5b97d1681d269a8200c26189a4213bd
Author: Matthias Clasen <mclasen redhat com>
Date: Wed Jan 17 19:48:33 2018 -0500
glarea: Avoid a crash
We must only delete the texture if it is not NULL.
gtk/gtkglarea.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkglarea.c b/gtk/gtkglarea.c
index efe4899..8e3cf4c 100644
--- a/gtk/gtkglarea.c
+++ b/gtk/gtkglarea.c
@@ -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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]