From eb4f962cfff3061bd30601ba6a4af81587c8decb Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Fri, 2 Mar 2012 14:58:14 +0200 Subject: Do not crash the compositor when hiding a widget. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I104307b3fc8e037e3871a6cae5c1ed3587ce0998 Reviewed-by: Samuel Rødal --- src/compositor/wayland_wrapper/wlsurface.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/compositor/wayland_wrapper/wlsurface.cpp b/src/compositor/wayland_wrapper/wlsurface.cpp index f4fee87ed..f7721c1a7 100644 --- a/src/compositor/wayland_wrapper/wlsurface.cpp +++ b/src/compositor/wayland_wrapper/wlsurface.cpp @@ -417,7 +417,7 @@ void Surface::surface_attach(struct wl_client *client, struct wl_resource *surfa Q_UNUSED(client); Q_UNUSED(x); Q_UNUSED(y); - resolve(surface)->attach(reinterpret_cast(buffer->data)); + resolve(surface)->attach(buffer ? reinterpret_cast(buffer->data) : 0); } void Surface::surface_damage(struct wl_client *client, struct wl_resource *surface, -- cgit v1.2.3