Mercurial > pidgin
comparison src/protocols/silc/silc.c @ 13409:0a3c968b07dc
[gaim-migrate @ 15784]
Resolve CID 71
Also, add a check for gc == NULL.
committer: Tailor Script <tailor@pidgin.im>
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Mon, 06 Mar 2006 21:35:26 +0000 |
parents | 263c2db78f77 |
children | cfc2f7fcb3dd |
comparison
equal
deleted
inserted
replaced
13408:b2efa1432708 | 13409:0a3c968b07dc |
---|---|
142 | 142 |
143 static void | 143 static void |
144 silcgaim_login_connected(gpointer data, gint source, GaimInputCondition cond) | 144 silcgaim_login_connected(gpointer data, gint source, GaimInputCondition cond) |
145 { | 145 { |
146 GaimConnection *gc = data; | 146 GaimConnection *gc = data; |
147 SilcGaim sg = gc->proto_data; | 147 SilcGaim sg; |
148 SilcClient client; | 148 SilcClient client; |
149 SilcClientConnection conn; | 149 SilcClientConnection conn; |
150 GaimAccount *account = sg->account; | 150 GaimAccount *account; |
151 SilcClientConnectionParams params; | 151 SilcClientConnectionParams params; |
152 const char *dfile; | 152 const char *dfile; |
153 | 153 |
154 g_return_if_fail(gc != NULL); | |
155 sg = gc->proto_data; | |
156 | |
154 if (source < 0) { | 157 if (source < 0) { |
155 gaim_connection_error(gc, _("Connection failed")); | 158 gaim_connection_error(gc, _("Connection failed")); |
156 return; | 159 return; |
157 } | 160 } |
158 | 161 |
159 if (sg == NULL) | 162 if (sg == NULL) |
160 return; | 163 return; |
161 | 164 |
162 client = sg->client; | 165 client = sg->client; |
166 account = sg->account; | |
163 | 167 |
164 if (!g_list_find(gaim_connections_get_all(), gc)) { | 168 if (!g_list_find(gaim_connections_get_all(), gc)) { |
165 close(source); | 169 close(source); |
166 g_source_remove(sg->scheduler); | 170 g_source_remove(sg->scheduler); |
167 silc_client_stop(sg->client); | 171 silc_client_stop(sg->client); |