Mercurial > pidgin.yaz
comparison src/conversation.c @ 4425:be8f9ca74ddf
[gaim-migrate @ 4700]
Gaim should no longer crash when the user is NULL and the conversation is
closed. This happened for instance when a user typed /part in an IRC
channel and then closed the tab.
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Sun, 26 Jan 2003 07:17:07 +0000 |
parents | c90039137172 |
children | 6e37eb000b7a |
comparison
equal
deleted
inserted
replaced
4424:eb116cc20200 | 4425:be8f9ca74ddf |
---|---|
888 * | 888 * |
889 * Long paragraph. <-- Short sentence. | 889 * Long paragraph. <-- Short sentence. |
890 * | 890 * |
891 * -- ChipX86 | 891 * -- ChipX86 |
892 */ | 892 */ |
893 if (g_slist_find(gc->buddy_chats, conv) != NULL) { | 893 if (gc && g_slist_find(gc->buddy_chats, conv) != NULL) { |
894 serv_chat_leave(gc, gaim_chat_get_id(GAIM_CHAT(conv))); | 894 serv_chat_leave(gc, gaim_chat_get_id(GAIM_CHAT(conv))); |
895 | 895 |
896 return; | 896 return; |
897 } | 897 } |
898 } | 898 } |
1008 } | 1008 } |
1009 | 1009 |
1010 struct gaim_connection * | 1010 struct gaim_connection * |
1011 gaim_conversation_get_gc(const struct gaim_conversation *conv) | 1011 gaim_conversation_get_gc(const struct gaim_conversation *conv) |
1012 { | 1012 { |
1013 if (conv == NULL) | 1013 struct aim_user *user; |
1014 return NULL; | 1014 |
1015 | 1015 if (conv == NULL) |
1016 return gaim_conversation_get_user(conv)->gc; | 1016 return NULL; |
1017 | |
1018 user = gaim_conversation_get_user(conv); | |
1019 | |
1020 if (user == NULL) | |
1021 return NULL; | |
1022 | |
1023 return user->gc; | |
1017 } | 1024 } |
1018 | 1025 |
1019 void | 1026 void |
1020 gaim_conversation_set_title(struct gaim_conversation *conv, const char *title) | 1027 gaim_conversation_set_title(struct gaim_conversation *conv, const char *title) |
1021 { | 1028 { |