summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.p.agocs@nokia.com>2012-03-02 14:58:14 +0200
committerSamuel Rødal <samuel.rodal@nokia.com>2012-03-02 14:03:47 +0100
commiteb4f962cfff3061bd30601ba6a4af81587c8decb (patch)
tree7a0bfe465e026e95668f2413c774bfb8d4ec0ca8
parent70e1dcbff0728ab19d741a77ecd5c9261c4922fe (diff)
downloadqtwayland-eb4f962cfff3061bd30601ba6a4af81587c8decb.tar.gz
Do not crash the compositor when hiding a widget.
Change-Id: I104307b3fc8e037e3871a6cae5c1ed3587ce0998 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
-rw-r--r--src/compositor/wayland_wrapper/wlsurface.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compositor/wayland_wrapper/wlsurface.cpp b/src/compositor/wayland_wrapper/wlsurface.cpp
index f4fee87e..f7721c1a 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>(surface)->attach(reinterpret_cast<wl_buffer *>(buffer->data));
+ resolve<Surface>(surface)->attach(buffer ? reinterpret_cast<wl_buffer *>(buffer->data) : 0);
}
void Surface::surface_damage(struct wl_client *client, struct wl_resource *surface,