From 8eca011fa7a2965aa80e8c83790c9b10362ab6a3 Mon Sep 17 00:00:00 2001 From: emersion Date: Wed, 23 May 2018 22:55:57 +0100 Subject: [PATCH] swaylock: don't try to render unconfigured surfaces --- render.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/render.c b/render.c index cc40f4e..05236de 100644 --- a/render.c +++ b/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);