diff --git a/src/compton.c b/src/compton.c index cdd53d7..93d4f4b 100644 --- a/src/compton.c +++ b/src/compton.c @@ -666,9 +666,11 @@ static void destroy_backend(session_t *ps) { if (ps->backend_data) { // deinit backend - ps->backend_data->ops->destroy_blur_context(ps->backend_data, - ps->backend_blur_context); - ps->backend_blur_context = NULL; + if (ps->backend_blur_context) { + ps->backend_data->ops->destroy_blur_context( + ps->backend_data, ps->backend_blur_context); + ps->backend_blur_context = NULL; + } ps->backend_data->ops->deinit(ps->backend_data); ps->backend_data = NULL; }