diff options
author | Matthias Clasen <mclasen@redhat.com> | 2018-01-17 20:19:19 -0500 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2018-01-17 20:19:19 -0500 |
commit | 47b7bfd2ba5e5cd4ca2873021c2fdc5ce148812d (patch) | |
tree | e62168111a4f4483a0a39ea1ff26f818455051e7 | |
parent | 5e302ae2cc62d2e1d7cae9e6efb3b32b368c7b30 (diff) | |
download | gtk+-47b7bfd2ba5e5cd4ca2873021c2fdc5ce148812d.tar.gz |
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.
-rw-r--r-- | gtk/gtkglarea.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gtk/gtkglarea.c b/gtk/gtkglarea.c index f6254cf8a4..d7e727b233 100644 --- a/gtk/gtkglarea.c +++ b/gtk/gtkglarea.c @@ -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); } |