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 | 8eca011fa7a2965aa80e8c83790c9b10362ab6a3 (patch) | |
| tree | 34fc426d838e06b21c7e48bd07e429f0b73a896a | |
| parent | ab7d22052a18f7124ef0840ff048d5f3ea20a411 (diff) | |
swaylock: don't try to render unconfigured surfaces
| -rw-r--r-- | render.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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); |
