From 27c76789e369fa1d3ad291c1805280a618b794e2 Mon Sep 17 00:00:00 2001 From: lenemter Date: Fri, 27 Oct 2023 10:02:23 +0900 Subject: [PATCH] Fix segmentation fault when `focus_window` is null --- src/WindowManager.vala | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/WindowManager.vala b/src/WindowManager.vala index b14c2e933..ee21b6985 100644 --- a/src/WindowManager.vala +++ b/src/WindowManager.vala @@ -566,7 +566,9 @@ namespace Gala { var direction = gesture_tracker.settings.get_natural_scroll_direction (gesture); moving = display.focus_window; - moving.change_workspace (manager.get_active_workspace ().get_neighbor (direction)); + if (moving != null) { + moving.change_workspace (manager.get_active_workspace ().get_neighbor (direction)); + } switch_to_next_workspace (direction); return;