aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Ashworth <RedSoxFan@users.noreply.github.com>2018-08-08 15:36:17 -0400
committerGitHub <noreply@github.com>2018-08-08 15:36:17 -0400
commitfc039f0759c1293fc270b631b035176f6924797b (patch)
treea4676629358071b0f0748dde33a32d82c9a58175
parente28101e6e1ed757fe8a7402c5123ee7e58546895 (diff)
parent3c26536267e13859eb6088ce0192579f10ac871f (diff)
Merge pull request #2423 from manio/master
[RFC] Fix segv when sway is terminating
-rw-r--r--sway/tree/view.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sway/tree/view.c b/sway/tree/view.c
index faaa53a1..950494d8 100644
--- a/sway/tree/view.c
+++ b/sway/tree/view.c
@@ -603,7 +603,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);