local: don't remove handlers in finalization

Require all handlers to be deregistered by their users before the local
finalization.
This commit is contained in:
Miroslav Lichvar
2020-05-21 11:47:38 +02:00
parent bf92314dc4
commit 5f6f265f80
7 changed files with 20 additions and 7 deletions

12
local.c
View File

@@ -185,13 +185,11 @@ LCL_Initialise(void)
void
LCL_Finalise(void)
{
while (change_list.next != &change_list)
LCL_RemoveParameterChangeHandler(change_list.next->handler,
change_list.next->anything);
while (dispersion_notify_list.next != &dispersion_notify_list)
LCL_RemoveDispersionNotifyHandler(dispersion_notify_list.next->handler,
dispersion_notify_list.next->anything);
/* Make sure all handlers have been removed */
if (change_list.next != &change_list)
assert(0);
if (dispersion_notify_list.next != &dispersion_notify_list)
assert(0);
}
/* ================================================== */