Merge pull request #2285 from linkmauve/nogui-no-x11
NoGUI: Don’t segfault when the DISPLAY environment variable isn’t set
This commit is contained in:
commit
6b82b31640
|
@ -118,6 +118,11 @@ class PlatformX11 : public Platform
|
|||
{
|
||||
XInitThreads();
|
||||
dpy = XOpenDisplay(nullptr);
|
||||
if (!dpy)
|
||||
{
|
||||
PanicAlert("No X11 display found");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
win = XCreateSimpleWindow(dpy, DefaultRootWindow(dpy),
|
||||
SConfig::GetInstance().m_LocalCoreStartupParameter.iRenderWindowXPos,
|
||||
|
|
Loading…
Reference in New Issue