execp: Fix segfault
This commit is contained in:
@@ -109,6 +109,10 @@ void init_execp()
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (to_remove) {
|
if (to_remove) {
|
||||||
|
if (to_remove == panel_config.execp_list) {
|
||||||
|
g_list_free_full(to_remove, destroy_execp);
|
||||||
|
panel_config.execp_list = NULL;
|
||||||
|
} else {
|
||||||
// Cut panel_config.execp_list
|
// Cut panel_config.execp_list
|
||||||
if (to_remove->prev)
|
if (to_remove->prev)
|
||||||
to_remove->prev->next = NULL;
|
to_remove->prev->next = NULL;
|
||||||
@@ -116,6 +120,7 @@ void init_execp()
|
|||||||
// Remove all elements of to_remove and to_remove itself
|
// Remove all elements of to_remove and to_remove itself
|
||||||
g_list_free_full(to_remove, destroy_execp);
|
g_list_free_full(to_remove, destroy_execp);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for (GList *l = panel_config.execp_list; l; l = l->next) {
|
for (GList *l = panel_config.execp_list; l; l = l->next) {
|
||||||
Execp *execp = l->data;
|
Execp *execp = l->data;
|
||||||
|
|||||||
Reference in New Issue
Block a user