First, we don't find the x_offset, so we go into the if() branch. There, we manage to add x_offset but not y_offset. This causes it to bail early. Then, next frame, it will find x_offset and go into the else branch. There, it fails to find y_offset, and eventually calls into nk_group_scrolled_offset_begin() with y_offset = NULL.
Never got a local repro so can't say for sure if the existing NK_ASSERT(y_offset) was firing, but end user reports that this patch fixes it.
I think this is one of the issues that was reported in #513
We hit a rare null deref on
y_offset
innk_group_scrolled_offset_begin()
, that I think happens like this:First, we don't find the
x_offset
, so we go into the if() branch. There, we manage to addx_offset
but noty_offset
. This causes it to bail early. Then, next frame, it will findx_offset
and go into the else branch. There, it fails to findy_offset
, and eventually calls intonk_group_scrolled_offset_begin()
withy_offset = NULL
.Never got a local repro so can't say for sure if the existing
NK_ASSERT(y_offset)
was firing, but end user reports that this patch fixes it.I think this is one of the issues that was reported in #513