diff --git a/src/x11/meta-x11-display.c b/src/x11/meta-x11-display.c index 16cab06d8..d78dfc828 100644 --- a/src/x11/meta-x11-display.c +++ b/src/x11/meta-x11-display.c @@ -1660,9 +1660,14 @@ meta_x11_display_remove_cursor_later (MetaX11Display *x11_display) if (x11_display->reload_x11_cursor_later) { MetaDisplay *display = x11_display->display; - MetaLaters *laters = meta_compositor_get_laters (display->compositor); - meta_laters_remove (laters, x11_display->reload_x11_cursor_later); + /* May happen during destruction */ + if (display->compositor) + { + MetaLaters *laters = meta_compositor_get_laters (display->compositor); + meta_laters_remove (laters, x11_display->reload_x11_cursor_later); + } + x11_display->reload_x11_cursor_later = 0; } }