From d1936d0585c35a0df0b40163506093850b9ab641 Mon Sep 17 00:00:00 2001 From: philmoz Date: Fri, 20 Dec 2024 11:59:27 +1100 Subject: [PATCH] fix(color): potential crash when changing screen layout (#5725) --- radio/src/gui/colorlcd/libui/table.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/radio/src/gui/colorlcd/libui/table.cpp b/radio/src/gui/colorlcd/libui/table.cpp index 83b296a8673..5a618cacfa4 100644 --- a/radio/src/gui/colorlcd/libui/table.cpp +++ b/radio/src/gui/colorlcd/libui/table.cpp @@ -326,7 +326,9 @@ void TableField::deleteLater(bool detach, bool trash) if (!deleted()) if (autoedit) { lv_group_t* g = (lv_group_t*)lv_obj_get_group(lvobj); - lv_group_set_focus_cb(g, nullptr); - lv_group_set_editing(g, false); + if (g) { + lv_group_set_focus_cb(g, nullptr); + lv_group_set_editing(g, false); + } } }