summaryrefslogtreecommitdiff
path: root/sway/xdg_decoration.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/xdg_decoration.c')
-rw-r--r--sway/xdg_decoration.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sway/xdg_decoration.c b/sway/xdg_decoration.c
index 39e0df56..9ac87191 100644
--- a/sway/xdg_decoration.c
+++ b/sway/xdg_decoration.c
@@ -10,7 +10,9 @@ static void xdg_decoration_handle_destroy(struct wl_listener *listener,
void *data) {
struct sway_xdg_decoration *deco =
wl_container_of(listener, deco, destroy);
- deco->view->xdg_decoration = NULL;
+ if(deco->view) {
+ deco->view->xdg_decoration = NULL;
+ }
wl_list_remove(&deco->destroy.link);
wl_list_remove(&deco->request_mode.link);
wl_list_remove(&deco->link);