aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2016-05-09 10:08:56 -0700
committerDrew DeVault <sir@cmpwn.com>2016-05-09 10:08:56 -0700
commitc7c2bf542af92907ac5b8c5361b8fe585427e9cf (patch)
tree2fef8450d98f7a93566940d90bddaa45e95b2341
parent8ee764e0c24378fe3d8e430bdbb40ea58ac9c28d (diff)
parent2fb4e5401ca224d704bd886d09c6f61bd66c26ea (diff)
Merge pull request #650 from neosilky/segfault
sway/container.c: fix segfault where view is assigned prematurely
-rw-r--r--sway/container.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sway/container.c b/sway/container.c
index b49b32ee..1a15aae1 100644
--- a/sway/container.c
+++ b/sway/container.c
@@ -820,10 +820,10 @@ swayc_t *swayc_tabbed_stacked_parent(swayc_t *view) {
return NULL;
}
do {
- view = view->parent;
if (view->layout == L_TABBED || view->layout == L_STACKED) {
parent = view;
}
+ view = view->parent;
} while (view && view->type != C_WORKSPACE);
return parent;