display: Fix X11 crash when DISPLAY unset.

This commit is contained in:
Lars Brinkhoff 2018-06-20 10:05:21 +02:00
parent 0a430fee9a
commit 8f9fc78632

View file

@ -272,6 +272,10 @@ ws_init(const char *crtname, /* crt type name */
xpixels = xp; /* save screen size */
ypixels = yp;
if (getenv ("DISPLAY") == NULL) {
return 0;
}
XtToolkitInitialize();
app_context = XtCreateApplicationContext();
argc = 0;