From 1e7ca7f579861d4920271684b3874bb5cfc7b762 Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Fri, 10 Apr 2015 19:07:11 +0200 Subject: [PATCH] =?UTF-8?q?NoGUI:=20Don=E2=80=99t=20segfault=20when=20the?= =?UTF-8?q?=20DISPLAY=20environment=20variable=20isn=E2=80=99t=20set?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Source/Core/DolphinWX/MainNoGUI.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Source/Core/DolphinWX/MainNoGUI.cpp b/Source/Core/DolphinWX/MainNoGUI.cpp index 7e072288fd..fffdbb3a4a 100644 --- a/Source/Core/DolphinWX/MainNoGUI.cpp +++ b/Source/Core/DolphinWX/MainNoGUI.cpp @@ -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,