diff options
author | Ilia Bozhinov <ammen99@gmail.com> | 2019-04-14 18:28:57 +0200 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2019-04-14 19:35:23 +0300 |
commit | dc5d1d08ef60a603790d823de021fcd986434c60 (patch) | |
tree | 1fc3766fea3b5f7ad1579553aaf52a123f463d29 | |
parent | 7a2f929201dfa8a939dae36476df2735386dad2b (diff) |
output: do nothing in output_set_image if backend has no renderer
This is useful when using the noop backend for example.
-rw-r--r-- | types/wlr_output.c | 6 |
1 files changed, 5 insertions, 1 deletions
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); |