comparison src/pounce.c @ 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 1a016d979ce0
children aab0c9508318
comparison
equal deleted inserted replaced
9597:d6f398e80b32 9598:0ad01d743f60
565 buffer = g_string_free(data->buffer, FALSE); 565 buffer = g_string_free(data->buffer, FALSE);
566 data->buffer = NULL; 566 data->buffer = NULL;
567 } 567 }
568 568
569 if (!strcmp(element_name, "account")) { 569 if (!strcmp(element_name, "account")) {
570 g_free(data->account_name);
570 data->account_name = g_strdup(buffer); 571 data->account_name = g_strdup(buffer);
571 } 572 }
572 else if (!strcmp(element_name, "pouncee")) { 573 else if (!strcmp(element_name, "pouncee")) {
574 g_free(data->pouncee);
573 data->pouncee = g_strdup(buffer); 575 data->pouncee = g_strdup(buffer);
574 } 576 }
575 else if (!strcmp(element_name, "event")) { 577 else if (!strcmp(element_name, "event")) {
576 if (!strcmp(data->event_type, "sign-on")) 578 if (!strcmp(data->event_type, "sign-on"))
577 data->events |= GAIM_POUNCE_SIGNON; 579 data->events |= GAIM_POUNCE_SIGNON;
592 594
593 g_free(data->event_type); 595 g_free(data->event_type);
594 data->event_type = NULL; 596 data->event_type = NULL;
595 } 597 }
596 else if (!strcmp(element_name, "action")) { 598 else if (!strcmp(element_name, "action")) {
597 gaim_pounce_action_register(data->pounce, data->action_name); 599 if (data->pounce != NULL) {
598 gaim_pounce_action_set_enabled(data->pounce, data->action_name, TRUE); 600 gaim_pounce_action_register(data->pounce, data->action_name);
601 gaim_pounce_action_set_enabled(data->pounce, data->action_name, TRUE);
602 }
599 603
600 g_free(data->action_name); 604 g_free(data->action_name);
601 data->action_name = NULL; 605 data->action_name = NULL;
602 } 606 }
603 else if (!strcmp(element_name, "param")) { 607 else if (!strcmp(element_name, "param")) {
604 gaim_pounce_action_set_attribute(data->pounce, data->action_name, 608 if (data->pounce != NULL) {
605 data->param_name, buffer); 609 gaim_pounce_action_set_attribute(data->pounce, data->action_name,
610 data->param_name, buffer);
611 }
606 612
607 g_free(data->param_name); 613 g_free(data->param_name);
608 data->param_name = NULL; 614 data->param_name = NULL;
609 } 615 }
610 else if (!strcmp(element_name, "events")) { 616 else if (!strcmp(element_name, "events")) {