From 4aea919a4d805a0cfafd475e4ee0170c4ea19667 Mon Sep 17 00:00:00 2001 From: Allister MacLeod Date: Tue, 8 Oct 2024 12:27:01 -0400 Subject: fix(display): Adding length check to layer_label in nice_view status widget. --- app/boards/shields/nice_view/widgets/status.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/boards') diff --git a/app/boards/shields/nice_view/widgets/status.c b/app/boards/shields/nice_view/widgets/status.c index fa0223551c..5cbbd91cd2 100644 --- a/app/boards/shields/nice_view/widgets/status.c +++ b/app/boards/shields/nice_view/widgets/status.c @@ -179,7 +179,7 @@ static void draw_bottom(lv_obj_t *widget, lv_color_t cbuf[], const struct status lv_canvas_draw_rect(canvas, 0, 0, CANVAS_SIZE, CANVAS_SIZE, &rect_black_dsc); // Draw layer - if (state->layer_label == NULL) { + if (state->layer_label == NULL || strlen(state->layer_label) == 0) { char text[10] = {}; sprintf(text, "LAYER %i", state->layer_index); -- cgit v1.2.3