fix(display): Adding length check to layer_label in nice_view status widget.

This commit is contained in:
Allister MacLeod 2024-10-08 12:27:01 -04:00 committed by GitHub
parent 47a17c64d7
commit 4aea919a4d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -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);