Mercurial > pidgin.yaz
comparison src/conversation.c @ 5680:71cc0d5376c2
[gaim-migrate @ 6098]
Fixed some warnings found by the new sanity checks.
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Mon, 02 Jun 2003 22:30:25 +0000 |
parents | 0adfd56b46b5 |
children | 1d140b31d4b3 |
comparison
equal
deleted
inserted
replaced
5679:0a0116686d51 | 5680:71cc0d5376c2 |
---|---|
752 gaim_window_switch_conversation(GaimWindow *win, unsigned int index) | 752 gaim_window_switch_conversation(GaimWindow *win, unsigned int index) |
753 { | 753 { |
754 GaimWindowUiOps *ops; | 754 GaimWindowUiOps *ops; |
755 | 755 |
756 g_return_if_fail(win != NULL); | 756 g_return_if_fail(win != NULL); |
757 g_return_if_fail(index >= 0 &&gaim_window_get_conversation_count(win)); | 757 g_return_if_fail(index >= 0 && |
758 index < gaim_window_get_conversation_count(win)); | |
758 | 759 |
759 ops = gaim_window_get_ui_ops(win); | 760 ops = gaim_window_get_ui_ops(win); |
760 | 761 |
761 if (ops != NULL && ops->switch_conversation != NULL) | 762 if (ops != NULL && ops->switch_conversation != NULL) |
762 ops->switch_conversation(win, index); | 763 ops->switch_conversation(win, index); |
769 gaim_window_get_active_conversation(const GaimWindow *win) | 770 gaim_window_get_active_conversation(const GaimWindow *win) |
770 { | 771 { |
771 GaimWindowUiOps *ops; | 772 GaimWindowUiOps *ops; |
772 | 773 |
773 g_return_val_if_fail(win != NULL, NULL); | 774 g_return_val_if_fail(win != NULL, NULL); |
775 | |
776 if (gaim_window_get_conversation_count(win) == 0) | |
777 return NULL; | |
774 | 778 |
775 ops = gaim_window_get_ui_ops(win); | 779 ops = gaim_window_get_ui_ops(win); |
776 | 780 |
777 if (ops != NULL && ops->get_active_index != NULL) | 781 if (ops != NULL && ops->get_active_index != NULL) |
778 return gaim_window_get_conversation_at(win, ops->get_active_index(win)); | 782 return gaim_window_get_conversation_at(win, ops->get_active_index(win)); |