diff options
author | Matthias Clasen <mclasen@redhat.com> | 2023-02-12 10:01:11 -0500 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2023-02-12 10:01:11 -0500 |
commit | d3dfdd214fc8114c299822fb80b98b23b035f01d (patch) | |
tree | ebbdc1acd0eac84b52f745f1f299f6c933bf09ad /gsk/gl | |
parent | b6c3cf4eee7af05d7bd5ce4fd9f421a2ae03d60b (diff) | |
download | gtk+-d3dfdd214fc8114c299822fb80b98b23b035f01d.tar.gz |
gl: Avoid a crash in the texture library
entry->texture can be NULL, so check before
using it.
Fixes: #5175
Diffstat (limited to 'gsk/gl')
-rw-r--r-- | gsk/gl/gskgltexturelibrary.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gsk/gl/gskgltexturelibrary.c b/gsk/gl/gskgltexturelibrary.c index c2ec0f84ab..6cbd7fa32a 100644 --- a/gsk/gl/gskgltexturelibrary.c +++ b/gsk/gl/gskgltexturelibrary.c @@ -112,7 +112,8 @@ gsk_gl_texture_library_real_compact (GskGLTextureLibrary *self, { if (!entry->accessed) { - gsk_gl_driver_release_texture (self->driver, entry->texture); + if (entry->texture) + gsk_gl_driver_release_texture (self->driver, entry->texture); g_hash_table_iter_remove (&iter); dropped++; } |