gl renderer: Avoid crashing tooltips

This commit is contained in:
Timm Bäder 2017-12-05 17:49:25 +01:00
parent 39a241b763
commit 7cc868910b

View File

@ -74,6 +74,8 @@ ops_set_clip (RenderOpBuilder *builder,
RenderOp *last_op;
GskRoundedRect prev_clip;
if (builder->render_ops->len > 0)
{
last_op = &g_array_index (builder->render_ops, RenderOp, builder->render_ops->len - 1);
if (last_op->op == OP_CHANGE_CLIP)
@ -88,6 +90,7 @@ ops_set_clip (RenderOpBuilder *builder,
op.clip = *clip;
g_array_append_val (builder->render_ops, op);
}
}
if (builder->current_program != NULL)
builder->program_state[builder->current_program->index].clip = *clip;