<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Nov 24, 2016 at 7:32 AM, Daniel Stone <span dir="ltr"><<a href="mailto:daniels@collabora.com" target="_blank">daniels@collabora.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Destroying a wl_cursor will attempt to access the wl_display, which<br>
we have just freed. Avoid a segfault by destroying the cursor images<br>
before we destroy the display.<br>
<br>
Signed-off-by: Daniel Stone <<a href="mailto:daniels@collabora.com">daniels@collabora.com</a>><br></blockquote><div><br></div><div>Yep, fixes the crash for me.</div><div><br></div><div>Reviewed-by: Dima Ryazanov <<a href="mailto:dima@gmail.com">dima@gmail.com</a>></div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
---<br>
 libweston/compositor-wayland.c | 8 ++++----<br>
 1 file changed, 4 insertions(+), 4 deletions(-)<br>
<br>
diff --git a/libweston/compositor-<wbr>wayland.c b/libweston/compositor-<wbr>wayland.c<br>
index d9cbde5..aa69c68 100644<br>
--- a/libweston/compositor-<wbr>wayland.c<br>
+++ b/libweston/compositor-<wbr>wayland.c<br>
@@ -2368,10 +2368,6 @@ wayland_destroy(struct weston_compositor *ec)<br>
        if (b->parent.compositor)<br>
                wl_compositor_destroy(b-><wbr>parent.compositor);<br>
<br>
-       wl_registry_destroy(b->parent.<wbr>registry);<br>
-       wl_display_flush(b->parent.wl_<wbr>display);<br>
-       wl_display_disconnect(b-><wbr>parent.wl_display);<br>
-<br>
        if (b->theme)<br>
                theme_destroy(b->theme);<br>
<br>
@@ -2380,6 +2376,10 @@ wayland_destroy(struct weston_compositor *ec)<br>
<br>
        wl_cursor_theme_destroy(b-><wbr>cursor_theme);<br>
<br>
+       wl_registry_destroy(b->parent.<wbr>registry);<br>
+       wl_display_flush(b->parent.wl_<wbr>display);<br>
+       wl_display_disconnect(b-><wbr>parent.wl_display);<br>
+<br>
        free(b);<br>
 }<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
2.9.3<br>
<br>
______________________________<wbr>_________________<br>
wayland-devel mailing list<br>
<a href="mailto:wayland-devel@lists.freedesktop.org">wayland-devel@lists.<wbr>freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/wayland-devel" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/wayland-devel</a><br>
</font></span></blockquote></div><br></div></div>