Merge pull request #659 from AntiBlueQuirk/pr_rendfix

Fixed a case where rendering would randomly assert if a temporary buffer failed to be allocated
pull/665/head
Micha Mettke 2018-04-06 01:20:09 -07:00 committed by GitHub
commit d230b81a2d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 4 deletions

View File

@ -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;
@ -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);

View File

@ -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;
@ -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);