wayland-stage: Fix a race condition early in init

If Xwayland takes too long to start up, Clutter can choose to draw, at
which point we'll crash because the MetaDisplay hasn't initialized yet.
This commit is contained in:
Jasper St. Pierre 2014-04-22 10:24:11 -04:00
parent 9a6f5e115d
commit 3c0ca1f2af

View File

@ -36,6 +36,10 @@ meta_wayland_stage_paint (ClutterActor *actor)
CLUTTER_ACTOR_CLASS (meta_wayland_stage_parent_class)->paint (actor); CLUTTER_ACTOR_CLASS (meta_wayland_stage_parent_class)->paint (actor);
/* Early in initialization, we can hit this. */
if (!display)
return;
tracker = meta_cursor_tracker_get_for_screen (display->screen); tracker = meta_cursor_tracker_get_for_screen (display->screen);
if (tracker) if (tracker)