| 666 if (win == NULL || index >= gaim_window_get_conversation_count(win) || |
666 if (win == NULL || index >= gaim_window_get_conversation_count(win) || |
| 667 index == new_index) |
667 index == new_index) |
| 668 return; |
668 return; |
| 669 |
669 |
| 670 /* We can't move this past the last index. */ |
670 /* We can't move this past the last index. */ |
| 671 if (new_index >= gaim_window_get_conversation_count(win)) |
671 if (new_index > gaim_window_get_conversation_count(win)) |
| 672 new_index = gaim_window_get_conversation_count(win) - 1; |
672 new_index = gaim_window_get_conversation_count(win); |
| 673 |
673 |
| 674 /* Get the list item for this conversation at its current index. */ |
674 /* Get the list item for this conversation at its current index. */ |
| 675 l = g_list_nth(gaim_window_get_conversations(win), index); |
675 l = g_list_nth(gaim_window_get_conversations(win), index); |
| 676 |
676 |
| 677 if (l == NULL) { |
677 if (l == NULL) { |