From: Matthias Clasen Date: Sun, 12 Feb 2023 15:01:11 +0000 (-0500) Subject: gl: Avoid a crash in the texture library X-Git-Tag: archive/raspbian/4.12.3+ds-1+rpi1~1^2^2^2~22^2~7^2~9^2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=d3dfdd214fc8114c299822fb80b98b23b035f01d;p=gtk4.git gl: Avoid a crash in the texture library entry->texture can be NULL, so check before using it. Fixes: #5175 --- 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++; }