From dc5d1d08ef60a603790d823de021fcd986434c60 Mon Sep 17 00:00:00 2001 From: Ilia Bozhinov Date: Sun, 14 Apr 2019 18:28:57 +0200 Subject: [PATCH] output: do nothing in output_set_image if backend has no renderer This is useful when using the noop backend for example. --- types/wlr_output.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/types/wlr_output.c b/types/wlr_output.c index 0c7003a7..2ed8733f 100644 --- a/types/wlr_output.c +++ b/types/wlr_output.c @@ -722,7 +722,11 @@ bool wlr_output_cursor_set_image(struct wlr_output_cursor *cursor, int32_t hotspot_x, int32_t hotspot_y) { struct wlr_renderer *renderer = wlr_backend_get_renderer(cursor->output->backend); - assert(renderer); + if (!renderer) { + // if the backend has no renderer, we can't draw a cursor, but this is + // actually okay, for ex. with the noop backend + return true; + } output_cursor_reset(cursor);