diff options
author | 2018-07-17 10:42:48 -0400 | |
---|---|---|
committer | 2018-07-17 10:42:48 -0400 | |
commit | b3014f7b168eb074bd071ee7cb930d74158a2895 (patch) | |
tree | c7168158be504f602fdf544167f01190b154392c /sway | |
parent | Merge pull request #2286 from RyanDwyer/default-floating-border (diff) | |
download | sway-b3014f7b168eb074bd071ee7cb930d74158a2895.tar.gz sway-b3014f7b168eb074bd071ee7cb930d74158a2895.tar.zst sway-b3014f7b168eb074bd071ee7cb930d74158a2895.zip |
Fix uninitialized pointer in view_unmap
Otherwise, sway crashes due to uninitialized pointer
dereference when AddressSanitizer is active.
Diffstat (limited to 'sway')
-rw-r--r-- | sway/tree/view.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sway/tree/view.c b/sway/tree/view.c index 70ab9364..fc31699c 100644 --- a/sway/tree/view.c +++ b/sway/tree/view.c | |||
@@ -621,16 +621,16 @@ void view_unmap(struct sway_view *view) { | |||
621 | view->urgent_timer = NULL; | 621 | view->urgent_timer = NULL; |
622 | } | 622 | } |
623 | 623 | ||
624 | struct sway_container *parent; | ||
625 | struct sway_container *ws = container_parent(view->swayc, C_WORKSPACE); | 624 | struct sway_container *ws = container_parent(view->swayc, C_WORKSPACE); |
626 | 625 | ||
626 | struct sway_container *parent; | ||
627 | if (view->is_fullscreen) { | 627 | if (view->is_fullscreen) { |
628 | ws->sway_workspace->fullscreen = NULL; | 628 | ws->sway_workspace->fullscreen = NULL; |
629 | parent = container_destroy(view->swayc); | 629 | parent = container_destroy(view->swayc); |
630 | 630 | ||
631 | arrange_windows(ws->parent); | 631 | arrange_windows(ws->parent); |
632 | } else { | 632 | } else { |
633 | struct sway_container *parent = container_destroy(view->swayc); | 633 | parent = container_destroy(view->swayc); |
634 | arrange_windows(parent); | 634 | arrange_windows(parent); |
635 | } | 635 | } |
636 | if (parent->type >= C_WORKSPACE) { // if the workspace still exists | 636 | if (parent->type >= C_WORKSPACE) { // if the workspace still exists |