display: Fix X11 crash when DISPLAY unset.
This commit is contained in:
parent
0a430fee9a
commit
8f9fc78632
1 changed files with 4 additions and 0 deletions
|
@ -272,6 +272,10 @@ ws_init(const char *crtname, /* crt type name */
|
||||||
xpixels = xp; /* save screen size */
|
xpixels = xp; /* save screen size */
|
||||||
ypixels = yp;
|
ypixels = yp;
|
||||||
|
|
||||||
|
if (getenv ("DISPLAY") == NULL) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
XtToolkitInitialize();
|
XtToolkitInitialize();
|
||||||
app_context = XtCreateApplicationContext();
|
app_context = XtCreateApplicationContext();
|
||||||
argc = 0;
|
argc = 0;
|
||||||
|
|
Loading…
Add table
Reference in a new issue