comparison src/protocols/silc/ops.c @ 13408:b2efa1432708

[gaim-migrate @ 15783] Dereferencing the gc pointer to get proto_data before the gc NULL check. Resolves CID 72 committer: Tailor Script <tailor@pidgin.im>
author Richard Laager <rlaager@wiktel.com>
date Mon, 06 Mar 2006 21:32:26 +0000
parents b704e60fe5de
children 1118b6fc3206
comparison
equal deleted inserted replaced
13407:2a12a59070e2 13408:b2efa1432708
1667 static void 1667 static void
1668 silc_connected(SilcClient client, SilcClientConnection conn, 1668 silc_connected(SilcClient client, SilcClientConnection conn,
1669 SilcClientConnectionStatus status) 1669 SilcClientConnectionStatus status)
1670 { 1670 {
1671 GaimConnection *gc = client->application; 1671 GaimConnection *gc = client->application;
1672 SilcGaim sg = gc->proto_data; 1672 SilcGaim sg;
1673 gboolean reject_watch, block_invites, block_ims; 1673 gboolean reject_watch, block_invites, block_ims;
1674 1674
1675 if (!gc) { 1675 if (gc == NULL) {
1676 sg->conn = NULL;
1677 silc_client_close_connection(client, conn); 1676 silc_client_close_connection(client, conn);
1678 return; 1677 return;
1679 } 1678 }
1679 sg = gc->proto_data;
1680 1680
1681 switch (status) { 1681 switch (status) {
1682 case SILC_CLIENT_CONN_SUCCESS: 1682 case SILC_CLIENT_CONN_SUCCESS:
1683 case SILC_CLIENT_CONN_SUCCESS_RESUME: 1683 case SILC_CLIENT_CONN_SUCCESS_RESUME:
1684 gaim_connection_set_state(gc, GAIM_CONNECTED); 1684 gaim_connection_set_state(gc, GAIM_CONNECTED);