diff options
author | Drew DeVault <sir@cmpwn.com> | 2016-06-18 13:45:39 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-06-18 13:45:39 -0400 |
commit | cdb6a9e94855e75fa20e14b766632dada3410292 (patch) | |
tree | 2591149dea0536a66624d9c1555c4ee15292aaec | |
parent | 3ce8cc807753119104d8836b6c77e19fd644a878 (diff) | |
parent | 7870a197fcdf4d6e77bea7133539d6637aba8479 (diff) |
Merge pull request #716 from Hummer12007/patch-1
Added a null check in tabbed_stacked_parent
-rw-r--r-- | sway/container.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sway/container.c b/sway/container.c index 15975064..21538ab4 100644 --- a/sway/container.c +++ b/sway/container.c @@ -853,12 +853,12 @@ swayc_t *swayc_tabbed_stacked_parent(swayc_t *view) { if (!ASSERT_NONNULL(view)) { return NULL; } - do { + while (view->type != C_WORKSPACE && view->parent) { view = view->parent; if (view->layout == L_TABBED || view->layout == L_STACKED) { parent = view; } - } while (view && view->type != C_WORKSPACE); + } return parent; } |