mirror of
https://github.com/brl/mutter.git
synced 2024-11-21 15:40:41 -05:00
window: Do not restore shortcuts on a NULL window
The "force restore shortcuts" being triggered by a key-combo, there is no guarantee that the currently focused window is actually non-NULL in which case we would crash. Make sure there is a window currently focused before trying to restore the shortcuts on that window. Closes: https://gitlab.gnome.org/GNOME/mutter/issues/464
This commit is contained in:
parent
1dc602e289
commit
7bd668e6d0
@ -3546,6 +3546,9 @@ handle_restore_shortcuts (MetaDisplay *display,
|
||||
{
|
||||
ClutterInputDevice *source;
|
||||
|
||||
if (!display->focus_window)
|
||||
return;
|
||||
|
||||
source = clutter_event_get_source_device ((ClutterEvent *) event);
|
||||
|
||||
meta_topic (META_DEBUG_KEYBINDINGS, "Restoring normal keyboard shortcuts\n");
|
||||
|
Loading…
Reference in New Issue
Block a user