changeset 2701:8a84f2bb1716

[gaim-migrate @ 2714] why? committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Sat, 10 Nov 2001 01:22:31 +0000
parents 59b9b9bed67f
children 94b4271b9567
files src/protocols/napster/napster.c
diffstat 1 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/protocols/napster/napster.c	Sat Nov 10 01:05:19 2001 +0000
+++ b/src/protocols/napster/napster.c	Sat Nov 10 01:22:31 2001 +0000
@@ -402,15 +402,21 @@
 static void nap_login_connect(gpointer data, gint source, GaimInputCondition cond)
 {
 	struct gaim_connection *gc = data;
-	struct nap_data *ndata = gc->proto_data;
+	struct nap_data *ndata;
 	char buf[NAP_BUF_LEN];
 
+	if (!g_slist_find(connections, gc)) {
+		close(source);
+		return;
+	}
+
 	if (source < 0) {
 		hide_login_progress(gc, "Unable to connect");
 		signoff(gc);
 		return;
 	}
 
+	ndata = gc->proto_data;
 	if (ndata->fd != source)
 		ndata->fd = source;