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 <yshuiv7@gmail.com>
This commit is contained in:
Yuxuan Shui 2019-03-05 22:35:44 +00:00
parent d0fd21e167
commit 7e3976947b
No known key found for this signature in database
GPG Key ID: 37C999F617EA1A47
1 changed files with 1 additions and 1 deletions

View File

@ -240,7 +240,7 @@ void paint_all_new(session_t *ps, win *const t, bool ignore_damage) {
}
pixman_region32_fini(&reg_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(&reg_damage);
ps->backend_data->ops->fill_rectangle(