diff options
author | emersion <contact@emersion.fr> | 2018-09-03 16:32:35 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-03 16:32:35 +0200 |
commit | 15c57f476f3407bb7eb28b4f906018d4dc192e36 (patch) | |
tree | 099e27761c70fec3c794e8a52cd2292a7d3fc210 /sway/desktop/render.c | |
parent | c9276f04c9fae7a211164003bc9cb8b4369db5fd (diff) | |
parent | e6fde0739a150e935b9b7e51aba7f4c0de05a1ee (diff) |
Merge pull request #2565 from ianyfan/fix-splashscreen-crash
Fix crash when a splash screen opens on an empty workspace
Diffstat (limited to 'sway/desktop/render.c')
-rw-r--r-- | sway/desktop/render.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sway/desktop/render.c b/sway/desktop/render.c index 5556e5b3..695213eb 100644 --- a/sway/desktop/render.c +++ b/sway/desktop/render.c @@ -346,7 +346,8 @@ static void render_titlebar(struct sway_output *output, float output_scale = output->wlr_output->scale; enum sway_container_layout layout = state->parent->current.layout; list_t *children = state->parent->current.children; - bool is_last_child = children->items[children->length - 1] == con; + bool is_last_child = children->length == 0 || + children->items[children->length - 1] == con; double output_x = output->swayc->current.swayc_x; double output_y = output->swayc->current.swayc_y; |