Skip to content

Commit

Permalink
Merge pull request vurtun#659 from AntiBlueQuirk/pr_rendfix
Browse files Browse the repository at this point in the history
Fixed a case where rendering would randomly assert if a temporary buffer failed to be allocated
  • Loading branch information
vurtun authored Apr 6, 2018
2 parents aa67524 + 47bc15f commit d230b81
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 4 deletions.
2 changes: 0 additions & 2 deletions nuklear.h
Original file line number Diff line number Diff line change
Expand Up @@ -9553,7 +9553,6 @@ nk_draw_list_stroke_poly_line(struct nk_draw_list *list, const struct nk_vec2 *p
nk_buffer_mark(list->vertices, NK_BUFFER_FRONT);
size = pnt_size * ((thick_line) ? 5 : 3) * points_count;
normals = (struct nk_vec2*) nk_buffer_alloc(list->vertices, NK_BUFFER_FRONT, size, pnt_align);
NK_ASSERT(normals);
if (!normals) return;
temp = normals + points_count;

Expand Down Expand Up @@ -9790,7 +9789,6 @@ nk_draw_list_fill_poly_convex(struct nk_draw_list *list,
nk_buffer_mark(list->vertices, NK_BUFFER_FRONT);
size = pnt_size * points_count;
normals = (struct nk_vec2*) nk_buffer_alloc(list->vertices, NK_BUFFER_FRONT, size, pnt_align);
NK_ASSERT(normals);
if (!normals) return;
vtx = (void*)((nk_byte*)list->vertices->memory.ptr + vertex_offset);

Expand Down
2 changes: 0 additions & 2 deletions src/nuklear_vertex.c
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,6 @@ nk_draw_list_stroke_poly_line(struct nk_draw_list *list, const struct nk_vec2 *p
nk_buffer_mark(list->vertices, NK_BUFFER_FRONT);
size = pnt_size * ((thick_line) ? 5 : 3) * points_count;
normals = (struct nk_vec2*) nk_buffer_alloc(list->vertices, NK_BUFFER_FRONT, size, pnt_align);
NK_ASSERT(normals);
if (!normals) return;
temp = normals + points_count;

Expand Down Expand Up @@ -687,7 +686,6 @@ nk_draw_list_fill_poly_convex(struct nk_draw_list *list,
nk_buffer_mark(list->vertices, NK_BUFFER_FRONT);
size = pnt_size * points_count;
normals = (struct nk_vec2*) nk_buffer_alloc(list->vertices, NK_BUFFER_FRONT, size, pnt_align);
NK_ASSERT(normals);
if (!normals) return;
vtx = (void*)((nk_byte*)list->vertices->memory.ptr + vertex_offset);

Expand Down

0 comments on commit d230b81

Please sign in to comment.