Skip to content

Commit

Permalink
Fix null deref in nk_group_scrolled_offset_begin
Browse files Browse the repository at this point in the history
  • Loading branch information
mtijanic committed Oct 30, 2023
1 parent bed81e2 commit 2b5fe63
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion nuklear.h
Original file line number Diff line number Diff line change
Expand Up @@ -22827,7 +22827,15 @@ nk_group_begin_titled(struct nk_context *ctx, const char *id,
NK_ASSERT(y_offset);
if (!x_offset || !y_offset) return 0;
*x_offset = *y_offset = 0;
} else y_offset = nk_find_value(win, id_hash+1);
} else {
y_offset = nk_find_value(win, id_hash+1);
if (!y_offset) {
y_offset = nk_add_value(ctx, win, id_hash+1, 0);
NK_ASSERT(y_offset);
if (!y_offset) return 0;
*y_offset = 0;
}
}
return nk_group_scrolled_offset_begin(ctx, x_offset, y_offset, title, flags);
}
NK_API nk_bool
Expand Down

0 comments on commit 2b5fe63

Please sign in to comment.