display: Don't crash on Alt-Escape.

Fix a crash caused by 286160646b, where
we don't get a window when called from do_choose_window.

https://bugzilla.gnome.org/show_bug.cgi?id=640229
This commit is contained in:
Jasper St. Pierre 2011-01-21 20:19:51 -05:00 committed by Florian Müllner
parent e2364b82ef
commit b4888103a6

View File

@ -3581,7 +3581,10 @@ meta_display_begin_grab_op (MetaDisplay *display,
display->grab_xwindow = grab_xwindow;
display->grab_button = button;
display->grab_mask = modmask;
display->grab_tile_mode = window->tile_mode;
if (window)
display->grab_tile_mode = window->tile_mode;
else
display->grab_tile_mode = META_TILE_NONE;
display->grab_anchor_root_x = root_x;
display->grab_anchor_root_y = root_y;
display->grab_latest_motion_x = root_x;