[#20266] Blender starting without X11 segfaults
Abort when ghost x11 cannot initialize a display. It would just crash later anyway, better to abort with a reasonable error message.
This commit is contained in:
parent
bcd1ab54cd
commit
bca53f0906
@ -66,8 +66,10 @@
|
|||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
|
#include <iostream>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <stdio.h> // for fprintf only
|
#include <stdio.h> // for fprintf only
|
||||||
|
#include <cstdlib> // for exit
|
||||||
|
|
||||||
typedef struct NDOFPlatformInfo {
|
typedef struct NDOFPlatformInfo {
|
||||||
Display *display;
|
Display *display;
|
||||||
@ -96,7 +98,10 @@ GHOST_SystemX11(
|
|||||||
{
|
{
|
||||||
m_display = XOpenDisplay(NULL);
|
m_display = XOpenDisplay(NULL);
|
||||||
|
|
||||||
if (!m_display) return;
|
if (!m_display) {
|
||||||
|
std::cerr << "Unable to open a display" << std::endl;
|
||||||
|
abort(); //was return before, but this would just mean it will crash later
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef __sgi
|
#ifdef __sgi
|
||||||
m_delete_window_atom
|
m_delete_window_atom
|
||||||
|
Loading…
x
Reference in New Issue
Block a user