diff --git a/gsk/gpu/gskgpuframe.c b/gsk/gpu/gskgpuframe.c index 6403ad982d..9fab9e537f 100644 --- a/gsk/gpu/gskgpuframe.c +++ b/gsk/gpu/gskgpuframe.c @@ -74,6 +74,7 @@ gsk_gpu_frame_default_cleanup (GskGpuFrame *self) } gsk_gpu_ops_set_size (&priv->ops, 0); + priv->first_op = NULL; priv->last_op = NULL; } @@ -283,6 +284,9 @@ gsk_gpu_frame_seal_ops (GskGpuFrame *self) GskGpuOp *last, *op; gsize i; + if (gsk_gpu_ops_get_size (&priv->ops) == 0) + return; + priv->first_op = (GskGpuOp *) gsk_gpu_ops_index (&priv->ops, 0); last = priv->first_op;