diff options
author | Ian Fan <ianfan0@gmail.com> | 2018-09-03 14:03:49 +0100 |
---|---|---|
committer | Ian Fan <ianfan0@gmail.com> | 2018-09-03 14:03:49 +0100 |
commit | e6fde0739a150e935b9b7e51aba7f4c0de05a1ee (patch) | |
tree | 099e27761c70fec3c794e8a52cd2292a7d3fc210 /sway/desktop | |
parent | Merge pull request #2553 from emersion/disabled-no-modeset (diff) | |
download | sway-e6fde0739a150e935b9b7e51aba7f4c0de05a1ee.tar.gz sway-e6fde0739a150e935b9b7e51aba7f4c0de05a1ee.tar.zst sway-e6fde0739a150e935b9b7e51aba7f4c0de05a1ee.zip |
Fix crash when a splash screen opens on an empty workspace
Diffstat (limited to 'sway/desktop')
-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, | |||
346 | float output_scale = output->wlr_output->scale; | 346 | float output_scale = output->wlr_output->scale; |
347 | enum sway_container_layout layout = state->parent->current.layout; | 347 | enum sway_container_layout layout = state->parent->current.layout; |
348 | list_t *children = state->parent->current.children; | 348 | list_t *children = state->parent->current.children; |
349 | bool is_last_child = children->items[children->length - 1] == con; | 349 | bool is_last_child = children->length == 0 || |
350 | children->items[children->length - 1] == con; | ||
350 | double output_x = output->swayc->current.swayc_x; | 351 | double output_x = output->swayc->current.swayc_x; |
351 | double output_y = output->swayc->current.swayc_y; | 352 | double output_y = output->swayc->current.swayc_y; |
352 | 353 | ||