shell, panel-list: Avoid accessing a negative array index

As the list of panels doesn't match the list of items in the model.
This commit is contained in:
Felipe Borges 2024-03-27 10:25:22 +01:00
parent 6127c08fa3
commit 08644a7402

View file

@ -487,7 +487,7 @@ header_func (GtkListBoxRow *row,
return;
pid = get_panel_id_index (get_panel_id_from_row (user_data, row));
if (g_str_equal (panel_order[pid-1], "separator"))
if (pid > 0 && g_str_equal (panel_order[pid-1], "separator"))
{
GtkWidget *separator;