summaryrefslogtreecommitdiff
path: root/gsk
diff options
context:
space:
mode:
authorTimm Bäder <mail@baedert.org>2020-05-10 09:07:30 +0200
committerTimm Bäder <mail@baedert.org>2020-05-10 09:30:15 +0200
commitb98ad549c2826ee254bfb9dbb2e23cd65079cdfa (patch)
treea4352be8a7e6bdc1f29170edca9daaf2af548cbe /gsk
parentd015b1b29eb377656d461fd20453b6f6a56f6de0 (diff)
downloadgtk+-b98ad549c2826ee254bfb9dbb2e23cd65079cdfa.tar.gz
gl renderer: Only destroy shader programs with ids > 0
We may return -1 as an error return value.
Diffstat (limited to 'gsk')
-rw-r--r--gsk/gl/gskglrenderer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gsk/gl/gskglrenderer.c b/gsk/gl/gskglrenderer.c
index c1fa55c2dd..ac8680ba0f 100644
--- a/gsk/gl/gskglrenderer.c
+++ b/gsk/gl/gskglrenderer.c
@@ -2573,7 +2573,7 @@ gsk_gl_renderer_programs_unref (GskGLRendererPrograms *programs)
{
for (i = 0; i < GL_N_PROGRAMS; i ++)
{
- if (programs->programs[i].id != 0)
+ if (programs->programs[i].id > 0)
glDeleteProgram (programs->programs[i].id);
gsk_transform_unref (programs->state[i].modelview);
}