# HG changeset patch # User Daniel Atallah # Date 1126660687 0 # Node ID 5c6c2e893803e7518ae4e470be665e66bdc2f905 # Parent 9b58dadf1c16d1894477596a5a7026937cd189cb [gaim-migrate @ 13792] Don't crash if logging out while connecting committer: Tailor Script diff -r 9b58dadf1c16 -r 5c6c2e893803 src/protocols/gg/gg.c --- a/src/protocols/gg/gg.c Wed Sep 14 01:15:28 2005 +0000 +++ b/src/protocols/gg/gg.c Wed Sep 14 01:18:07 2005 +0000 @@ -1174,24 +1174,25 @@ /* static void ggp_close(GaimConnection *gc) {{{ */ static void ggp_close(GaimConnection *gc) { - GGPInfo *info; if (gc == NULL) { gaim_debug_info("gg", "gc == NULL\n"); return; } - info = gc->proto_data; - - /* XXX: Any way to pass description here? */ - if (info->session != NULL) - gg_change_status(info->session, GG_STATUS_NOT_AVAIL); + if (gc->proto_data) { + GGPInfo *info = gc->proto_data; + /* XXX: Any way to pass description here? */ + if (info->session != NULL) { + gg_change_status(info->session, GG_STATUS_NOT_AVAIL); + gg_logoff(info->session); + gg_free_session(info->session); + } + } if (gc->inpa > 0) gaim_input_remove(gc->inpa); - gg_logoff(info->session); - gg_free_session(info->session); ggp_buddylist_offline(gc); gaim_debug_info("gg", "Connection closed.\n");