comparison src/server.c @ 5706:8e618a7111a5

[gaim-migrate @ 6127] Fixed a segfault when user info is NULL. committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Tue, 03 Jun 2003 10:46:21 +0000
parents dae79aefac8d
children 4115f24e6e24
comparison
equal deleted inserted replaced
5705:cd408d69ad2e 5706:8e618a7111a5
137 } 137 }
138 138
139 void serv_finish_login(GaimConnection *gc) 139 void serv_finish_login(GaimConnection *gc)
140 { 140 {
141 GaimPluginProtocolInfo *prpl_info = NULL; 141 GaimPluginProtocolInfo *prpl_info = NULL;
142 GaimAccount *account;
142 143
143 if (gc != NULL && gc->prpl != NULL) 144 if (gc != NULL && gc->prpl != NULL)
144 prpl_info = GAIM_PLUGIN_PROTOCOL_INFO(gc->prpl); 145 prpl_info = GAIM_PLUGIN_PROTOCOL_INFO(gc->prpl);
145 146
146 if (strlen(gc->account->user_info)) { 147 account = gaim_connection_get_account(gc);
148
149 if (gaim_account_get_user_info(account) != NULL) {
147 /* g_malloc(strlen(gc->user->user_info) * 4); 150 /* g_malloc(strlen(gc->user->user_info) * 4);
148 strncpy_withhtml(buf, gc->user->user_info, strlen(gc->user->user_info) * 4); */ 151 strncpy_withhtml(buf, gc->user->user_info, strlen(gc->user->user_info) * 4); */
149 serv_set_info(gc, gc->account->user_info); 152 serv_set_info(gc, (char *)gaim_account_get_user_info(account));
150 /* g_free(buf); */ 153 /* g_free(buf); */
151 } 154 }
152 155
153 if (gc->idle_timer > 0) 156 if (gc->idle_timer > 0)
154 g_source_remove(gc->idle_timer); 157 g_source_remove(gc->idle_timer);