Fix #108 pushing wrong texture in empty draw_list

Fixed a small copy & paste error which pushes the wrong texture
into an empty draw list. In normal cases this never occurs but is
still a big if used independent of libraries use cases.
This commit is contained in:
vurtun 2016-04-23 16:29:58 +02:00
parent 87efb61a9f
commit 412f65fa65
1 changed files with 1 additions and 1 deletions

View File

@ -5658,7 +5658,7 @@ nk_draw_list_push_image(struct nk_draw_list *list, nk_handle texture)
NK_ASSERT(list);
if (!list) return;
if (!list->cmd_count) {
nk_draw_list_push_command(list, nk_null_rect, list->null.texture);
nk_draw_list_push_command(list, nk_null_rect, texture);
} else {
struct nk_draw_command *prev = nk_draw_list_command_last(list);
if (prev->elem_count == 0)