display: Fix crash with cycle_group

Commit e3ebcc004d introduced an unsafe
access for 'window', which could cause a segfault.

https://bugzilla.gnome.org/show_bug.cgi?id=645843
This commit is contained in:
Jasper St. Pierre 2011-03-24 02:04:23 -04:00
parent f464b85ffc
commit a3ea43da52

View File

@ -3528,7 +3528,7 @@ meta_display_begin_grab_op (MetaDisplay *display,
* grab the parent instead for moving.
*/
if (meta_prefs_get_attach_modal_dialogs () &&
window->type == META_WINDOW_MODAL_DIALOG &&
window && window->type == META_WINDOW_MODAL_DIALOG &&
meta_grab_op_is_moving (op))
grab_window = meta_window_get_transient_for (window);