From 7e3976947bd02a5c94a5fdf33f46b6955df272f0 Mon Sep 17 00:00:00 2001 From: Yuxuan Shui Date: Tue, 5 Mar 2019 22:35:44 +0000 Subject: [PATCH] Fix crash when using monitor-repaint If monitor-repaint is not implemented by the backend, compton will crash. This commit fix the crash by not doing monitor-repaint in that case. Signed-off-by: Yuxuan Shui --- src/backend/backend.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/backend.c b/src/backend/backend.c index 146c9726..975d859f 100644 --- a/src/backend/backend.c +++ b/src/backend/backend.c @@ -240,7 +240,7 @@ void paint_all_new(session_t *ps, win *const t, bool ignore_damage) { } pixman_region32_fini(®_damage); - if (ps->o.monitor_repaint) { + if (ps->o.monitor_repaint && ps->backend_data->ops->fill_rectangle) { reg_damage = get_damage(ps, false); auto extent = pixman_region32_extents(®_damage); ps->backend_data->ops->fill_rectangle(