Mercurial > pidgin
changeset 8004:07dc83303503
[gaim-migrate @ 8681]
Removing a signal handler while a signal is being emitted could crash Gaim.
This should now be fixed.
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Mon, 05 Jan 2004 07:03:56 +0000 |
parents | b9d3d397a195 |
children | 3bdfb4308d10 |
files | src/signals.c |
diffstat | 1 files changed, 8 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/signals.c Mon Jan 05 06:16:48 2004 +0000 +++ b/src/signals.c Mon Jan 05 07:03:56 2004 +0000 @@ -412,7 +412,7 @@ GaimInstanceData *instance_data; GaimSignalData *signal_data; GaimSignalHandlerData *handler_data; - GList *l; + GList *l, *l_next; g_return_if_fail(instance != NULL); g_return_if_fail(signal != NULL); @@ -432,8 +432,10 @@ return; } - for (l = signal_data->handlers; l != NULL; l = l->next) + for (l = signal_data->handlers; l != NULL; l = l_next) { + l_next = l->next; + handler_data = (GaimSignalHandlerData *)l->data; if (handler_data->use_vargs) @@ -473,7 +475,7 @@ GaimSignalData *signal_data; GaimSignalHandlerData *handler_data; void *ret_val = NULL; - GList *l; + GList *l, *l_next; g_return_val_if_fail(instance != NULL, NULL); g_return_val_if_fail(signal != NULL, NULL); @@ -493,8 +495,10 @@ return 0; } - for (l = signal_data->handlers; l != NULL; l = l->next) + for (l = signal_data->handlers; l != NULL; l = l_next) { + l_next = l->next; + handler_data = (GaimSignalHandlerData *)l->data; if (handler_data->use_vargs)