# HG changeset patch # User Daniel Atallah # Date 1141340112 0 # Node ID d1b29fb3b6d0250d1492af3604bc48be6d3e1fdd # Parent c1f5d9858c1dfd74664029ae813f67248ea7607c [gaim-migrate @ 15754] peer_connection->conn appears to be NULL in certain situations, it is preferable not to crash when this happens. committer: Tailor Script diff -r c1f5d9858c1d -r d1b29fb3b6d0 src/protocols/oscar/oscar.c --- a/src/protocols/oscar/oscar.c Thu Mar 02 21:41:20 2006 +0000 +++ b/src/protocols/oscar/oscar.c Thu Mar 02 22:55:12 2006 +0000 @@ -894,7 +894,7 @@ if (!name) return NULL; - + x = strchr(name, '-'); if (!x) return NULL; @@ -2360,7 +2360,8 @@ if (gaim_xfer_get_status(xfer) != GAIM_XFER_STATUS_CANCEL_REMOTE) aim_im_sendch2_sendfile_cancel(peer_connection->sess, peer_connection); - oscar_connection_destroy(peer_connection->sess, peer_connection->conn); + if(peer_connection->sess && peer_connection->conn) + oscar_connection_destroy(peer_connection->sess, peer_connection->conn); aim_oft_destroyinfo(peer_connection); xfer->data = NULL; od->file_transfers = g_slist_remove(od->file_transfers, xfer); @@ -5206,7 +5207,7 @@ } /* - * We get this error when there was an error in the locate family. This + * We get this error when there was an error in the locate family. This * happens when you request info of someone who is offline. */ static int gaim_parse_locerr(OscarSession *sess, FlapFrame *fr, ...) { @@ -7461,7 +7462,7 @@ reason = g_strdup(_("No reason given.")); dialog_msg = g_strdup_printf( - _("The user %s wants to add %s to their buddy list for the following reason:\n%s"), + _("The user %s wants to add %s to their buddy list for the following reason:\n%s"), nombre, gaim_account_get_username(account), reason); g_free(reason);