execp: Fix segfault
This commit is contained in:
parent
c125e73402
commit
b1374f0cb8
1 changed files with 11 additions and 6 deletions
|
@ -109,12 +109,17 @@ void init_execp()
|
||||||
}
|
}
|
||||||
|
|
||||||
if (to_remove) {
|
if (to_remove) {
|
||||||
// Cut panel_config.execp_list
|
if (to_remove == panel_config.execp_list) {
|
||||||
if (to_remove->prev)
|
g_list_free_full(to_remove, destroy_execp);
|
||||||
to_remove->prev->next = NULL;
|
panel_config.execp_list = NULL;
|
||||||
to_remove->prev = NULL;
|
} else {
|
||||||
// Remove all elements of to_remove and to_remove itself
|
// Cut panel_config.execp_list
|
||||||
g_list_free_full(to_remove, destroy_execp);
|
if (to_remove->prev)
|
||||||
|
to_remove->prev->next = NULL;
|
||||||
|
to_remove->prev = NULL;
|
||||||
|
// Remove all elements of to_remove and to_remove itself
|
||||||
|
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) {
|
||||||
|
|
Loading…
Reference in a new issue