gl renderer: Only destroy shader programs with ids > 0

We may return -1 as an error return value.
This commit is contained in:
Timm Bäder 2020-05-10 09:07:30 +02:00
parent d015b1b29e
commit b98ad549c2

View File

@ -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);
}