aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorminus <minus@mnus.de>2019-03-09 11:06:09 +0100
committeremersion <contact@emersion.fr>2019-03-09 11:21:41 +0100
commit5fab8a2ad4c05fb7bfdbb45915b8abf7ebeab5fe (patch)
treee5cd5ad4270ab12fbd148b0fe86aff4ab99a929b
parent1a9145e40983aa84da0e08ec3806b6e6fc8983f8 (diff)
downloadsway-5fab8a2ad4c05fb7bfdbb45915b8abf7ebeab5fe.zip
sway-5fab8a2ad4c05fb7bfdbb45915b8abf7ebeab5fe.tar.gz
sway-5fab8a2ad4c05fb7bfdbb45915b8abf7ebeab5fe.tar.bz2
Fix crash when moving window to scratchpad
-rw-r--r--sway/ipc-json.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sway/ipc-json.c b/sway/ipc-json.c
index e9564b0..bebe6dd 100644
--- a/sway/ipc-json.c
+++ b/sway/ipc-json.c
@@ -354,7 +354,8 @@ static void get_deco_rect(struct sway_container *c, struct wlr_box *deco_rect) {
enum sway_container_layout parent_layout = container_parent_layout(c);
if ((parent_layout != L_TABBED && parent_layout != L_STACKED &&
c->current.border != B_NORMAL) ||
- c->fullscreen_mode != FULLSCREEN_NONE) {
+ c->fullscreen_mode != FULLSCREEN_NONE ||
+ c->workspace == NULL) {
deco_rect->x = deco_rect->y = deco_rect->width = deco_rect->height = 0;
return;
}