From 9318021778fc0bd6dc4093abd893cf74866a4c77 Mon Sep 17 00:00:00 2001 From: Yuxuan Shui Date: Thu, 16 May 2019 02:24:32 +0100 Subject: [PATCH] make sure backend_data is not null ... before assigning to backend_data->ops in initialize_backend() Signed-off-by: Yuxuan Shui --- src/compton.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compton.c b/src/compton.c index 38c1c3f9..366a85bb 100644 --- a/src/compton.c +++ b/src/compton.c @@ -676,13 +676,13 @@ static bool initialize_backend(session_t *ps) { assert(!ps->backend_data); // Reinitialize win_data ps->backend_data = backend_list[ps->o.backend]->init(ps); - ps->backend_data->ops = backend_list[ps->o.backend]; if (!ps->backend_data) { log_fatal("Failed to initialize backend, aborting..."); ps->quit = true; ev_break(ps->loop, EVBREAK_ALL); return false; } + ps->backend_data->ops = backend_list[ps->o.backend]; // window_stack shouldn't include window that's not in the hash table at // this point. Since there cannot be any fading windows.