summaryrefslogtreecommitdiffstats
path: root/x11vnc.c
diff options
context:
space:
mode:
authordscho <dscho>2001-11-26 17:06:39 +0000
committerdscho <dscho>2001-11-26 17:06:39 +0000
commit3825ed9fb99d0626c57deffe19b825e9619fafe4 (patch)
treec9b3166532195e35a02478640b55d195bd205652 /x11vnc.c
parent7094fbc15be9f4ae0dea90293d23fda25ddcfd86 (diff)
downloadlibtdevnc-3825ed9fb99d0626c57deffe19b825e9619fafe4.tar.gz
libtdevnc-3825ed9fb99d0626c57deffe19b825e9619fafe4.zip
no crash when display was wrong
Diffstat (limited to 'x11vnc.c')
-rw-r--r--x11vnc.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/x11vnc.c b/x11vnc.c
index 394631f..aaa4d27 100644
--- a/x11vnc.c
+++ b/x11vnc.c
@@ -243,6 +243,11 @@ int main(int argc,char** argv)
if(dpy==0)
dpy = XOpenDisplay("");
+ if(dpy==0) {
+ fprintf(stderr,"Couldn't open display!\n");
+ exit(2);
+ }
+
xscreen = DefaultScreen(dpy);
init_keycodes();