[gtk/wip/baedert/for-master: 6/7] gl renderer: Only destroy shader programs with ids > 0



commit b98ad549c2826ee254bfb9dbb2e23cd65079cdfa
Author: Timm Bäder <mail baedert org>
Date:   Sun May 10 09:07:30 2020 +0200

    gl renderer: Only destroy shader programs with ids > 0
    
    We may return -1 as an error return value.

 gsk/gl/gskglrenderer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
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);
         }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]