Mercurial > pidgin
changeset 9598:0ad01d743f60
[gaim-migrate @ 10441]
Get rid of 2 assertion failed messages when you delete an account that
has pounces. Also stop 2 memleaks that will never ever happen. Ever.
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Mon, 26 Jul 2004 04:05:08 +0000 |
parents | d6f398e80b32 |
children | a1029432ae4a |
files | src/pounce.c |
diffstat | 1 files changed, 10 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/pounce.c Mon Jul 26 03:27:03 2004 +0000 +++ b/src/pounce.c Mon Jul 26 04:05:08 2004 +0000 @@ -567,9 +567,11 @@ } if (!strcmp(element_name, "account")) { + g_free(data->account_name); data->account_name = g_strdup(buffer); } else if (!strcmp(element_name, "pouncee")) { + g_free(data->pouncee); data->pouncee = g_strdup(buffer); } else if (!strcmp(element_name, "event")) { @@ -594,15 +596,19 @@ data->event_type = NULL; } else if (!strcmp(element_name, "action")) { - gaim_pounce_action_register(data->pounce, data->action_name); - gaim_pounce_action_set_enabled(data->pounce, data->action_name, TRUE); + if (data->pounce != NULL) { + gaim_pounce_action_register(data->pounce, data->action_name); + gaim_pounce_action_set_enabled(data->pounce, data->action_name, TRUE); + } g_free(data->action_name); data->action_name = NULL; } else if (!strcmp(element_name, "param")) { - gaim_pounce_action_set_attribute(data->pounce, data->action_name, - data->param_name, buffer); + if (data->pounce != NULL) { + gaim_pounce_action_set_attribute(data->pounce, data->action_name, + data->param_name, buffer); + } g_free(data->param_name); data->param_name = NULL;