summaryrefslogtreecommitdiffstats
path: root/sesman/chansrv
diff options
context:
space:
mode:
authorjsorg71 <jay.sorg@gmail.com>2015-03-12 15:36:31 -0700
committerjsorg71 <jay.sorg@gmail.com>2015-03-12 15:36:31 -0700
commit4f60b58b176d068e485066d1de0574b2b6cdc5e1 (patch)
treede7c05934a29f40683709eac5033cdc52590059a /sesman/chansrv
parent5969e11153a7c186d36361c26b788488e5ddd4a2 (diff)
parentf59c925f8b0a1ee55bf7d7da75f0e20a899c980d (diff)
downloadxrdp-proprietary-4f60b58b176d068e485066d1de0574b2b6cdc5e1.tar.gz
xrdp-proprietary-4f60b58b176d068e485066d1de0574b2b6cdc5e1.zip
Merge pull request #212 from robertalks/devel
fix possible segfault in chansrv if DISPLAY is not set
Diffstat (limited to 'sesman/chansrv')
-rw-r--r--sesman/chansrv/chansrv.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sesman/chansrv/chansrv.c b/sesman/chansrv/chansrv.c
index af2f6957..29e8c106 100644
--- a/sesman/chansrv/chansrv.c
+++ b/sesman/chansrv/chansrv.c
@@ -1534,7 +1534,9 @@ main(int argc, char **argv)
display_text = g_getenv("DISPLAY");
LOGM((LOG_LEVEL_INFO, "main: DISPLAY env var set to %s", display_text));
- get_display_num_from_display(display_text);
+
+ if (display_text)
+ get_display_num_from_display(display_text);
if (g_display_num == 0)
{