From b556f176487b8b16aa558e2d2a54974b4cf7b7b4 Mon Sep 17 00:00:00 2001 From: bi4k8 Date: Mon, 28 Nov 2022 19:23:23 +0000 Subject: [PATCH] x11: early-return from use_xdbe_setting::set_up if X11 not initialized --- src/x11.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/x11.cc b/src/x11.cc index dd85531a..a3573327 100644 --- a/src/x11.cc +++ b/src/x11.cc @@ -94,7 +94,7 @@ void out_to_x_setting::cleanup(lua::state &l) { #ifdef BUILD_XDBE bool use_xdbe_setting::set_up(lua::state &l) { // double_buffer makes no sense when not drawing to X - if (!out_to_x.get(l)) { return false; } + if (!out_to_x.get(l) || !display || !window.window) { return false; } int major, minor;