summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinWX/MainNoGUI.cpp
diff options
context:
space:
mode:
authorskidau <skidau@gmail.com>2015-04-16 11:58:15 +1000
committerskidau <skidau@gmail.com>2015-04-16 11:58:15 +1000
commit6b82b31640d4b77f1d23b52b16747b6d562f182c (patch)
tree8ecd4e8d16dea0b158b26c2e46feecb20b89a76b /Source/Core/DolphinWX/MainNoGUI.cpp
parent8bb7f785b0ef14253a9aceef347912e699b28675 (diff)
parent1e7ca7f579861d4920271684b3874bb5cfc7b762 (diff)
Merge pull request #2285 from linkmauve/nogui-no-x11
NoGUI: Don’t segfault when the DISPLAY environment variable isn’t set
Diffstat (limited to 'Source/Core/DolphinWX/MainNoGUI.cpp')
-rw-r--r--Source/Core/DolphinWX/MainNoGUI.cpp5
1 files changed, 5 insertions, 0 deletions
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,