Application.Client: Fix criticals when opening first new window
If there is no existing window, then `current` will be null.
This commit is contained in:
parent
e4683c1dfc
commit
8f278e3e03
1 changed files with 7 additions and 4 deletions
|
|
@ -1184,11 +1184,14 @@ public class Application.Client : Gtk.Application {
|
|||
private void on_activate_new_window() {
|
||||
// If there was an existing active main, select the same
|
||||
// account/folder/conversation.
|
||||
Geary.Folder? folder = null;
|
||||
Gee.Collection<Geary.App.Conversation>? conversations = null;
|
||||
MainWindow? current = this.last_active_main_window;
|
||||
this.new_window.begin(
|
||||
current.selected_folder,
|
||||
current.conversation_list_view.copy_selected()
|
||||
);
|
||||
if (current != null) {
|
||||
folder = current.selected_folder;
|
||||
conversations = current.conversation_list_view.copy_selected();
|
||||
}
|
||||
this.new_window.begin(folder, conversations);
|
||||
}
|
||||
|
||||
private void on_activate_preferences() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue