From b446a5f6361037845d306283d670bac77a3cbdf7 Mon Sep 17 00:00:00 2001 From: Consolatis <35009135+Consolatis@users.noreply.github.com> Date: Thu, 2 Apr 2026 19:32:36 +0200 Subject: [PATCH] osd-thumbnail: handle buffer allocation failure Fixes: #3489 --- src/cycle/osd-thumbnail.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/cycle/osd-thumbnail.c b/src/cycle/osd-thumbnail.c index aa853987..623708a0 100644 --- a/src/cycle/osd-thumbnail.c +++ b/src/cycle/osd-thumbnail.c @@ -85,6 +85,10 @@ render_thumb(struct output *output, struct view *view) struct wlr_buffer *buffer = wlr_allocator_create_buffer(server.allocator, view->current.width, view->current.height, &output->wlr_output->swapchain->format); + if (!buffer) { + wlr_log(WLR_ERROR, "failed to allocate buffer for thumbnail"); + return NULL; + } struct wlr_render_pass *pass = wlr_renderer_begin_buffer_pass( server.renderer, buffer, NULL); render_node(pass, &view->content_tree->node, 0, 0);