From c5bab5b98a826ef472cd9b814d2dfee2dc76ed20 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Sat, 2 Mar 2019 19:57:22 -0600 Subject: [PATCH] Work around crash in clipboard --- sesman/chansrv/clipboard.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sesman/chansrv/clipboard.c b/sesman/chansrv/clipboard.c index a690e5e2..e91c1cde 100644 --- a/sesman/chansrv/clipboard.c +++ b/sesman/chansrv/clipboard.c @@ -376,6 +376,12 @@ clipboard_init(void) return 0; } + if (!g_display) + { + // prevent crash in XInternAtom + return 3; + } + xfuse_init(); xcommon_init(); g_incr_max_req_size = XMaxRequestSize(g_display) * 4 - 24;