changeset 13381:d1b29fb3b6d0

[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 <tailor@pidgin.im>
author Daniel Atallah <daniel.atallah@gmail.com>
date Thu, 02 Mar 2006 22:55:12 +0000
parents c1f5d9858c1d
children 7ab959eb857e
files src/protocols/oscar/oscar.c
diffstat 1 files changed, 5 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- 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);