gsk/gl: check for format as well
authorChristian Hergert <chergert@redhat.com>
Mon, 14 Mar 2022 23:22:52 +0000 (16:22 -0700)
committerChristian Hergert <chergert@redhat.com>
Fri, 18 Mar 2022 19:33:33 +0000 (12:33 -0700)
This could potentially happen if a uniform had never been set.

gsk/gl/gskglcommandqueue.c

index b7640edf87107a2deb8ea43e7d98bc58a0c15ef0..4d7ef4b3d3cb0fd19b5b7a74ceed02216bf788c3 100644 (file)
@@ -282,7 +282,7 @@ snapshot_uniforms (GskGLUniformState    *state,
     {
       const GskGLUniformMapping *mapping = &program->mappings[i];
 
-      if (!mapping->info.initial && mapping->location > -1)
+      if (!mapping->info.initial && mapping->info.format && mapping->location > -1)
         {
           uniform[count].location = mapping->location;
           uniform[count].info = mapping->info;