diff options
author | emersion <contact@emersion.fr> | 2018-05-23 22:55:57 +0100 |
---|---|---|
committer | emersion <contact@emersion.fr> | 2018-05-23 22:55:57 +0100 |
commit | 32f8ade7ab6228835144b519d927fd1eeaa2333a (patch) | |
tree | 11fc85b76d96fdad83f31dbf1019442552de5419 /swaylock | |
parent | cd0fca2ebf81c252b3743c4474a5fdbcd3e2afad (diff) | |
download | sway-32f8ade7ab6228835144b519d927fd1eeaa2333a.tar.xz |
swaylock: don't try to render unconfigured surfaces
Diffstat (limited to 'swaylock')
-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) { int buffer_width = surface->width * surface->scale; int buffer_height = surface->height * surface->scale; + if (buffer_width == 0 || buffer_height == 0) { + return; // not yet configured + } surface->current_buffer = get_next_buffer(state->shm, surface->buffers, buffer_width, buffer_height); |