diff options
author | marha <marha@users.sourceforge.net> | 2010-04-16 15:34:33 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2010-04-16 15:34:33 +0000 |
commit | 0b8629ada4293370d220bbb7e6c195c711baee7d (patch) | |
tree | a7774b45662db90282ae18b17eb3d8f77d8c746d /xorg-server/os | |
parent | 8654ee514b4d79feec936501717a06892090d3b7 (diff) | |
download | vcxsrv-0b8629ada4293370d220bbb7e6c195c711baee7d.tar.gz vcxsrv-0b8629ada4293370d220bbb7e6c195c711baee7d.tar.bz2 vcxsrv-0b8629ada4293370d220bbb7e6c195c711baee7d.zip |
svn merge -r534:HEAD ^/branches/released .
Diffstat (limited to 'xorg-server/os')
-rw-r--r-- | xorg-server/os/connection.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/xorg-server/os/connection.c b/xorg-server/os/connection.c index 39f1dae87..73a37df49 100644 --- a/xorg-server/os/connection.c +++ b/xorg-server/os/connection.c @@ -1281,10 +1281,11 @@ MakeClientGrabPervious(ClientPtr client) void ListenOnOpenFD(int fd, int noxauth) { char port[256]; XtransConnInfo ciptr; + const char *display_env = getenv("DISPLAY"); - if(!strncmp(getenv("DISPLAY"), "/tmp/launch", 11)) { + if(display_env && (strncmp(display_env, "/tmp/launch", 11) == 0)) { /* Make the path the launchd socket if our DISPLAY is set right */ - strcpy(port, getenv("DISPLAY")); + strcpy(port, display_env); } else { /* Just some default so things don't break and die. */ sprintf(port, ":%d", atoi(display)); |