# HG changeset patch # User Evan Schoenberg # Date 1169046427 0 # Node ID 00d0d452437728e42bb362a2e4272fcb4714c3b9 # Parent db11d9e416ac6c2c8d28891854be97757fb0a397 [gaim-migrate @ 18148] Some safety which should avoid a post-disconnect crash I've seen reported committer: Tailor Script diff -r db11d9e416ac -r 00d0d4524377 libgaim/protocols/oscar/flap_connection.c --- a/libgaim/protocols/oscar/flap_connection.c Wed Jan 17 09:47:55 2007 +0000 +++ b/libgaim/protocols/oscar/flap_connection.c Wed Jan 17 15:07:07 2007 +0000 @@ -359,7 +359,7 @@ conn = data; od = conn->od; - account = gaim_connection_get_account(od->gc); + account = (GAIM_CONNECTION_IS_VALID(od->gc) ? gaim_connection_get_account(od->gc) : NULL); gaim_debug_info("oscar", "Destroying oscar connection of " "type 0x%04hx\n", conn->type); @@ -370,8 +370,8 @@ * TODO: If we don't have a SNAC_FAMILY_LOCATE connection then * we should try to request one instead of disconnecting. */ - if (!account->disconnecting && ((od->oscar_connections == NULL) - || (!flap_connection_getbytype(od, SNAC_FAMILY_LOCATE)))) + if (account && !account->disconnecting && + ((od->oscar_connections == NULL) || (!flap_connection_getbytype(od, SNAC_FAMILY_LOCATE)))) { /* No more FLAP connections! Sign off this GaimConnection! */ gchar *tmp;