diff options
author | Drew DeVault <sir@cmpwn.com> | 2016-05-09 10:08:56 -0700 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2016-05-09 10:08:56 -0700 |
commit | c7c2bf542af92907ac5b8c5361b8fe585427e9cf (patch) | |
tree | 2fef8450d98f7a93566940d90bddaa45e95b2341 | |
parent | Merge pull request #649 from mikkeloscar/floating-layout (diff) | |
parent | sway/container.c: fix segfault where view is assigned prematurely (diff) | |
download | sway-c7c2bf542af92907ac5b8c5361b8fe585427e9cf.tar.gz sway-c7c2bf542af92907ac5b8c5361b8fe585427e9cf.tar.zst sway-c7c2bf542af92907ac5b8c5361b8fe585427e9cf.zip |
Merge pull request #650 from neosilky/segfault
sway/container.c: fix segfault where view is assigned prematurely
-rw-r--r-- | sway/container.c | 2 |
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) { | |||
820 | return NULL; | 820 | return NULL; |
821 | } | 821 | } |
822 | do { | 822 | do { |
823 | view = view->parent; | ||
824 | if (view->layout == L_TABBED || view->layout == L_STACKED) { | 823 | if (view->layout == L_TABBED || view->layout == L_STACKED) { |
825 | parent = view; | 824 | parent = view; |
826 | } | 825 | } |
826 | view = view->parent; | ||
827 | } while (view && view->type != C_WORKSPACE); | 827 | } while (view && view->type != C_WORKSPACE); |
828 | 828 | ||
829 | return parent; | 829 | return parent; |