Skip to content

Commit

Permalink
fix scrollbar crash
Browse files Browse the repository at this point in the history
Copy paste mistake was checking the background type for the cursor style,
leading to a crash if background was image type and cursor was color, as
it would try to use the cursor color as a texture.
  • Loading branch information
wheybags committed May 7, 2018
1 parent 823f79f commit b7725b4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nuklear.h
Original file line number Diff line number Diff line change
Expand Up @@ -21260,7 +21260,7 @@ nk_draw_scrollbar(struct nk_command_buffer *out, nk_flags state,
}

/* draw cursor */
if (background->type == NK_STYLE_ITEM_COLOR) {
if (cursor->type == NK_STYLE_ITEM_COLOR) {
nk_fill_rect(out, *scroll, style->rounding_cursor, cursor->data.color);
nk_stroke_rect(out, *scroll, style->rounding_cursor, style->border_cursor, style->cursor_border_color);
} else nk_draw_image(out, *scroll, &cursor->data.image, nk_white);
Expand Down

0 comments on commit b7725b4

Please sign in to comment.