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;