Mercurial > pidgin
comparison src/server.c @ 5311:3f625896f932
[gaim-migrate @ 5683]
The rest of serv_set_away() checks for NULL pointers, but the initial
strcmps do not. Fixed.
committer: Tailor Script <tailor@pidgin.im>
| author | Christian Hammond <chipx86@chipx86.com> |
|---|---|
| date | Tue, 06 May 2003 04:37:11 +0000 |
| parents | 6aa785e55d0f |
| children | 1f901484599d |
comparison
equal
deleted
inserted
replaced
| 5310:f4912a833ff6 | 5311:3f625896f932 |
|---|---|
| 292 | 292 |
| 293 void serv_set_away(struct gaim_connection *gc, char *state, char *message) | 293 void serv_set_away(struct gaim_connection *gc, char *state, char *message) |
| 294 { | 294 { |
| 295 GaimPluginProtocolInfo *prpl_info = NULL; | 295 GaimPluginProtocolInfo *prpl_info = NULL; |
| 296 | 296 |
| 297 if (!strcmp(gc->away_state, state) && !strcmp(gc->away, message)) | 297 if (gc->away_state != NULL && state != NULL && |
| 298 !strcmp(gc->away_state, state)) { | |
| 299 | |
| 298 return; | 300 return; |
| 299 | 301 } |
| 302 | |
| 303 if (gc->away != NULL && message != NULL && !strcmp(gc->away, message)) | |
| 304 return; | |
| 300 | 305 |
| 301 if (gc != NULL && gc->prpl != NULL) | 306 if (gc != NULL && gc->prpl != NULL) |
| 302 prpl_info = GAIM_PLUGIN_PROTOCOL_INFO(gc->prpl); | 307 prpl_info = GAIM_PLUGIN_PROTOCOL_INFO(gc->prpl); |
| 303 | 308 |
| 304 if (prpl_info && prpl_info->set_away) { | 309 if (prpl_info && prpl_info->set_away) { |
