Commit 4465ee54 authored by Matthias Clasen's avatar Matthias Clasen
Browse files

Merge branch 'ngl-crash' into 'master'

ngl: Fix a rare assertion violation

Closes #3853

See merge request !3434
parents f5d90826 c66b0304
Pipeline #274432 passed with stages
in 21 minutes and 38 seconds
......@@ -215,7 +215,17 @@ gsk_ngl_uniform_state_end_frame (GskNglUniformState *state)
state->values_pos = allocator;
g_assert (allocator <= state->values_len);
/* It can happen that our space requirements grow due to
* difference in order increasing padding. As a pragmatic
* solution to this, just increase the allocation to cover
* the predefined mappins.
*/
if (allocator > state->values_len)
{
while (allocator > state->values_len)
state->values_len *= 2;
state->values_buf = g_realloc (state->values_buf, state->values_len);
}
memset (state->apply_hash, 0, sizeof state->apply_hash);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment