diff --git a/libs/ui/imui.c b/libs/ui/imui.c index 26489240d..460bb0db8 100644 --- a/libs/ui/imui.c +++ b/libs/ui/imui.c @@ -1007,9 +1007,11 @@ IMUI_Checkbox (imui_ctx_t *ctx, bool *flag, const char *label) set_fill (ctx, punch, ctx->style.background.color[mode]); } - auto text = View_New (ctx->vsys, view); - set_control (ctx, text, false); - add_text (ctx, text, state, mode); + if (state->label_len) { + auto text = View_New (ctx->vsys, view); + set_control (ctx, text, false); + add_text (ctx, text, state, mode); + } if (check_button_state (ctx, state->entity)) { *flag = !*flag;