From: Giulio Camuffo Date: Tue, 13 Aug 2013 09:42:02 +0000 (+0200) Subject: xwm: do not crash when activating a NULL surface X-Git-Tag: 1.2.91~126 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9f42e50868279e6fed5be1f34acad44b1292e29a;p=platform%2Fupstream%2Fweston.git xwm: do not crash when activating a NULL surface --- diff --git a/src/xwayland/window-manager.c b/src/xwayland/window-manager.c index d565888..4c9d477 100644 --- a/src/xwayland/window-manager.c +++ b/src/xwayland/window-manager.c @@ -610,11 +610,15 @@ static void weston_wm_window_activate(struct wl_listener *listener, void *data) { struct weston_surface *surface = data; - struct weston_wm_window *window = get_wm_window(surface); + struct weston_wm_window *window = NULL; struct weston_wm *wm = container_of(listener, struct weston_wm, activate_listener); xcb_client_message_event_t client_message; + if (surface) { + window = get_wm_window(surface); + } + if (window) { client_message.response_type = XCB_CLIENT_MESSAGE; client_message.format = 32;