From 3c0ca1f2afe05191af9de0d1ee84b606233403d7 Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Tue, 22 Apr 2014 10:24:11 -0400 Subject: [PATCH] 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. --- src/wayland/meta-wayland-stage.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/wayland/meta-wayland-stage.c b/src/wayland/meta-wayland-stage.c index 97c264732..39e41ab69 100644 --- a/src/wayland/meta-wayland-stage.c +++ b/src/wayland/meta-wayland-stage.c @@ -36,6 +36,10 @@ meta_wayland_stage_paint (ClutterActor *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); if (tracker)