From 488db11f14195d6eb72d72148b760753d77f32af 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 38c1c3f..366a85b 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.