<div dir="ltr">I haven't figured out how to fix the crash, but wanted to bring it up before the 1.4 release.<div><br></div><div>It's pretty easy to reproduce it:</div><div>1. Open weston-terminal (or maybe another client)</div>
<div>2. Right-click the titlebar</div><div>3. Click "close"</div><div><br></div><div>As far as I can tell, the problem is these lines in destroy_shell_surface in shell.c:</div><div><br></div><div><div><span class="" style="white-space:pre"> </span>wl_list_remove(&shsurf->children_link);</div>
<div><span class="" style="white-space:pre"> </span>wl_list_for_each_safe(child, next, &shsurf->children_list, children_link) {</div><div><span class="" style="white-space:pre"> </span>wl_list_remove(&child->children_link);</div>
<div><span class="" style="white-space:pre"> </span>child->parent = NULL;</div><div><span class="" style="white-space:pre"> </span>}</div></div><div><br></div><div>The same children_link gets removed twice, resulting in a NULL pointer. First, the parent surface calls "wl_list_remove(&child->children_link);" on its child. Later, the child surface itself gets destroyed and calls "wl_list_remove(&shsurf->children_link);" on itself. I don't understand the code well enough to fix this, though.</div>
<div><br></div></div>