[mutter] keybindings: Don't crash if we don't have any windows to activate



commit c81a0dede2605910a1b16e3e8ac4c8f41f1931b6
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Thu May 15 15:02:46 2014 -0400

    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 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/core/keybindings.c b/src/core/keybindings.c
index 166acfe..abf5cd8 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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]