Bug: https://github.com/WeAreROLI/JUCE/issues/422
This is a slight modification of https://github.com/WeAreROLI/JUCE/issues/422 by
IOhannes m zmölnig, using early exits rather than longish if-clauses (mainly to
minimize the diff).
Gbp-Pq: Name 0011-Don-t-fail-fatally-if-gui-cannot-connect-to-X-server.patch
\r
::Display* XWindowSystem::displayUnref() noexcept\r
{\r
- jassert (display != nullptr);\r
+ if (!display)\r
+ return display;\r
jassert (displayCount.get() > 0);\r
\r
if (--displayCount == 0)\r
if (display == nullptr)\r
{\r
Logger::outputDebugString ("Failed to connect to the X Server.");\r
- Process::terminate();\r
+ return;\r
}\r
\r
// Create a context to store user data associated with Windows we create\r
\r
void XWindowSystem::destroyXDisplay() noexcept\r
{\r
+ if (!display)\r
+ return;\r
+\r
ScopedXLock xlock (display);\r
XDestroyWindow (display, juce_messageWindowHandle);\r
juce_messageWindowHandle = 0;\r