From c81a0dede2605910a1b16e3e8ac4c8f41f1931b6 Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Thu, 15 May 2014 15:02:46 -0400 Subject: [PATCH] keybindings: Don't crash if we don't have any windows to activate Pressing Alt+Tab when we have no windows should not crash your desktop, especially when it's so easy to hit when trying to test switching VTs. --- src/core/keybindings.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core/keybindings.c b/src/core/keybindings.c index 166acfeda..abf5cd815 100644 --- a/src/core/keybindings.c +++ b/src/core/keybindings.c @@ -2772,7 +2772,8 @@ do_choose_window (MetaDisplay *display, NULL, backward); - meta_window_activate (window, event->time); + if (window) + meta_window_activate (window, event->time); } static void