Do not crash the compositor when hiding a widget.
authorLaszlo Agocs <laszlo.p.agocs@nokia.com>
Fri, 2 Mar 2012 12:58:14 +0000 (14:58 +0200)
committerSamuel Rødal <samuel.rodal@nokia.com>
Fri, 2 Mar 2012 13:03:47 +0000 (14:03 +0100)
Change-Id: I104307b3fc8e037e3871a6cae5c1ed3587ce0998
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
src/compositor/wayland_wrapper/wlsurface.cpp

index f4fee87..f7721c1 100644 (file)
@@ -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,