diff options
Diffstat (limited to 'swaylock/render.c')
-rw-r--r-- | swaylock/render.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/swaylock/render.c b/swaylock/render.c index 05236dea..2032ddcf 100644 --- a/swaylock/render.c +++ b/swaylock/render.c @@ -23,6 +23,10 @@ void render_frame(struct swaylock_surface *surface) { surface->current_buffer = get_next_buffer(state->shm, surface->buffers, buffer_width, buffer_height); + if (surface->current_buffer == NULL) { + return; + } + cairo_t *cairo = surface->current_buffer->cairo; cairo_identity_matrix(cairo); |