Skip to content

Commit

Permalink
fix(display): Adding length check to layer_label in nice_view status …
Browse files Browse the repository at this point in the history
…widget.
  • Loading branch information
amacleod authored Oct 8, 2024
1 parent 47a17c6 commit 4aea919
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/boards/shields/nice_view/widgets/status.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 4aea919

Please sign in to comment.