gsk: Fix a crash
authorMatthias Clasen <mclasen@redhat.com>
Tue, 16 May 2023 21:32:13 +0000 (17:32 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Tue, 16 May 2023 21:33:21 +0000 (17:33 -0400)
When we start ignoring batches, we must do it everywhere,
or we may run into assertions. This was triggered by an
enormous text node tree produced by tests/rendernode-create.

gsk/gl/gskglcommandqueue.c

index e7af501582d4abdc27ab9bf677f5561cd064c6fd..6c6a27ca88d18ddd9f4258ccdca330597de0417c 100644 (file)
@@ -721,6 +721,10 @@ gsk_gl_command_queue_split_draw (GskGLCommandQueue *self)
 
   g_assert (GSK_IS_GL_COMMAND_QUEUE (self));
   g_assert (self->batches.len > 0);
+
+  if (will_ignore_batch (self))
+    return;
+
   g_assert (self->in_draw == TRUE);
 
   program = self->program_info;