sway

i3-compatible Wayland compositor
git clone https://git.awy.one/sway
Log | Files | Refs | README | LICENSE

commit 776b9b7e1fa72ebc4f7e79de280ea5dd9901787e
parent 0cd418ba42bf7fa9570a2c1c09cea153d3337c7a
Author: Mariusz Bialonczyk <manio@skyboo.net>
Date:   Sun,  5 Aug 2018 16:59:10 +0200

Fix segv when sway is terminating

I've got the following SIGSEGV when terminating sway:
```
Program terminated with signal SIGSEGV, Segmentation fault.
0x00005607dc603af5 in view_unmap (view=0x5607dcb3d350) at ../sway/tree/view.c:599
599		if (surviving_ancestor->type >= C_WORKSPACE) {
```
surviving_ancestor was NULL at that time

This commit is trying to fix this problem.

Diffstat:
Msway/tree/view.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sway/tree/view.c b/sway/tree/view.c @@ -596,7 +596,7 @@ void view_unmap(struct sway_view *view) { struct sway_container *surviving_ancestor = container_destroy(view->swayc); // If the workspace wasn't reaped - if (surviving_ancestor->type >= C_WORKSPACE) { + if (surviving_ancestor && surviving_ancestor->type >= C_WORKSPACE) { struct sway_container *ws = surviving_ancestor->type == C_WORKSPACE ? surviving_ancestor : container_parent(surviving_ancestor, C_WORKSPACE);