diff --git a/src/client/conversation-list/conversation-list-view.vala b/src/client/conversation-list/conversation-list-view.vala index 0489ad3f..0a082563 100644 --- a/src/client/conversation-list/conversation-list-view.vala +++ b/src/client/conversation-list/conversation-list-view.vala @@ -512,8 +512,14 @@ public class ConversationList.View : Gtk.ScrolledWindow, Geary.BaseInterface { */ private Gtk.ListBoxRow? get_next_conversation(bool asc=true) { int index = asc ? 0 : int.MAX; + GLib.List selected_rows; - foreach (Gtk.ListBoxRow row in this.list.get_selected_rows().copy()) { + selected_rows = this.list.get_selected_rows(); + if (selected_rows.length() == 0 ) { + return null; + } + + foreach (var row in selected_rows) { if ((asc && row.get_index() > index) || (!asc && row.get_index() < index)) { index = row.get_index();