diff --git a/src/compton.c b/src/compton.c index aa09d2d..0f99106 100644 --- a/src/compton.c +++ b/src/compton.c @@ -804,10 +804,9 @@ restack_win(session_t *ps, win *w, xcb_window_t new_above) { /// Handle configure event of a root window void configure_root(session_t *ps, int width, int height) { // On root window changes - auto bi = backend_list[ps->o.backend]; + bool has_root_change = ps->backend_data->ops->root_change != NULL; if (ps->o.experimental_backends) { - assert(bi); - if (!ps->backend_data->ops->root_change) { + if (!has_root_change) { // deinit/reinit backend if the backend cannot handle root change ps->backend_data->ops->deinit(ps->backend_data); ps->backend_data = NULL; @@ -836,7 +835,7 @@ void configure_root(session_t *ps, int width, int height) { glx_on_root_change(ps); #endif if (ps->o.experimental_backends) { - if (ps->backend_data->ops->root_change) { + if (has_root_change) { ps->backend_data->ops->root_change(ps->backend_data, ps); } else { ps->backend_data = backend_list[ps->o.backend](ps);