Skip to content

Commit

Permalink
Silence critical warning on startup (#2182)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeremy Wootten authored May 2, 2023
1 parent 11e9c1b commit 8d04065
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/View/Window.vala
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,9 @@ namespace Files.View {
});

tabs.tab_switched.connect ((old_tab, new_tab) => {
change_tab (tabs.get_tab_position (new_tab));
if (new_tab != null) {
change_tab (tabs.get_tab_position (new_tab));
}
});

tabs.tab_restored.connect ((label, restore_data, icon) => {
Expand Down Expand Up @@ -1052,7 +1054,9 @@ namespace Files.View {
}

private void save_active_tab_position () {
Files.app_settings.set_int ("active-tab-position", tabs.get_tab_position (tabs.current));
if (tabs.current != null) {
Files.app_settings.set_int ("active-tab-position", tabs.get_tab_position (tabs.current));
}
}

public uint restore_tabs () {
Expand Down

0 comments on commit 8d04065

Please sign in to comment.