changeset 12002:06065a4847ff

[gaim-migrate @ 14295] When loading our pounces from pounces.xml, if we have a pounce for an account that does not exist, then we remove the pounce from the list. My two changes: 1. Save pounces.xml if this happens 2. Don't print an error when trying to add the pounce to our list when data->pounce is NULL (this happens in the scenario described above) committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Mon, 07 Nov 2005 04:59:35 +0000
parents 8bcccf2988fa
children 13da3f228bbb
files src/pounce.c
diffstat 1 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/pounce.c	Mon Nov 07 04:49:23 2005 +0000
+++ b/src/pounce.c	Mon Nov 07 04:59:35 2005 +0000
@@ -430,6 +430,11 @@
 		if (account == NULL) {
 			gaim_debug(GAIM_DEBUG_ERROR, "pounce",
 					   "Account for pounce not found!\n");
+			/*
+			 * This pounce has effectively been removed, so make
+			 * sure that we save the changes to pounces.xml
+			 */
+			schedule_pounces_save();
 		}
 		else {
 			gaim_debug(GAIM_DEBUG_INFO, "pounce",
@@ -444,7 +449,8 @@
 		data->pouncee = NULL;
 	}
 	else if (!strcmp(element_name, "save")) {
-		gaim_pounce_set_save(data->pounce, TRUE);
+		if (data->pounce != NULL)
+			gaim_pounce_set_save(data->pounce, TRUE);
 	}
 	else if (!strcmp(element_name, "pounce")) {
 		data->pounce = NULL;