Mercurial > pidgin.yaz
changeset 11538:5c6c2e893803
[gaim-migrate @ 13792]
Don't crash if logging out while connecting
committer: Tailor Script <tailor@pidgin.im>
author | Daniel Atallah <daniel.atallah@gmail.com> |
---|---|
date | Wed, 14 Sep 2005 01:18:07 +0000 |
parents | 9b58dadf1c16 |
children | 5a2c38d33eb4 |
files | src/protocols/gg/gg.c |
diffstat | 1 files changed, 9 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- 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");