diff options
author | 2018-05-23 18:11:24 -0400 | |
---|---|---|
committer | 2018-05-23 18:11:24 -0400 | |
commit | 50d1b80d507096ad55e9e2fbb56b31b09b6671dc (patch) | |
tree | 3dc61f6ba02d754e71df1499c406f8586b853f76 /swaylock/render.c | |
parent | Merge pull request #2022 from RedSoxFan/ipc-get-marks (diff) | |
parent | swaylock: remove unused field (diff) | |
download | sway-50d1b80d507096ad55e9e2fbb56b31b09b6671dc.tar.gz sway-50d1b80d507096ad55e9e2fbb56b31b09b6671dc.tar.zst sway-50d1b80d507096ad55e9e2fbb56b31b09b6671dc.zip |
Merge pull request #2003 from emersion/fix-swaylock-hotplugging
Fix swaylock crashing when plugging/unplugging output
Diffstat (limited to 'swaylock/render.c')
-rw-r--r-- | swaylock/render.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/swaylock/render.c b/swaylock/render.c index cc40f4e9..05236dea 100644 --- a/swaylock/render.c +++ b/swaylock/render.c | |||
@@ -17,6 +17,9 @@ void render_frame(struct swaylock_surface *surface) { | |||
17 | 17 | ||
18 | int buffer_width = surface->width * surface->scale; | 18 | int buffer_width = surface->width * surface->scale; |
19 | int buffer_height = surface->height * surface->scale; | 19 | int buffer_height = surface->height * surface->scale; |
20 | if (buffer_width == 0 || buffer_height == 0) { | ||
21 | return; // not yet configured | ||
22 | } | ||
20 | 23 | ||
21 | surface->current_buffer = get_next_buffer(state->shm, | 24 | surface->current_buffer = get_next_buffer(state->shm, |
22 | surface->buffers, buffer_width, buffer_height); | 25 | surface->buffers, buffer_width, buffer_height); |