comparison pidgin/gtkpounce.c @ 20275:9ad7979b4838

If a pounce has been deleted or triggered while we're editing it, make a new one when saving instead of crashing. Fixes #3326
author Daniel Atallah <daniel.atallah@gmail.com>
date Sat, 29 Sep 2007 02:49:25 +0000
parents 6b8bc3309ab7
children 9e45c28b4b2b fdefa5eb46e2
comparison
equal deleted inserted replaced
20274:d9e391c08e08 20275:9ad7979b4838
303 g_free(message); 303 g_free(message);
304 message = NULL; 304 message = NULL;
305 } 305 }
306 if (*command == '\0') command = NULL; 306 if (*command == '\0') command = NULL;
307 if (*sound == '\0') sound = NULL; 307 if (*sound == '\0') sound = NULL;
308
309 /* If the pounce has already been triggered, let's pretend it is a new one */
310 if (dialog->pounce != NULL
311 && g_list_find(purple_pounces_get_all(), dialog->pounce) == NULL) {
312 purple_debug_info("gtkpounce", "Saving pounce that no longer exists; creating new pounce.\n");
313 dialog->pounce = NULL;
314 }
308 315
309 if (dialog->pounce == NULL) 316 if (dialog->pounce == NULL)
310 { 317 {
311 dialog->pounce = purple_pounce_new(PIDGIN_UI, dialog->account, 318 dialog->pounce = purple_pounce_new(PIDGIN_UI, dialog->account,
312 name, events, options); 319 name, events, options);