summaryrefslogtreecommitdiff
path: root/recordmydesktop/src/recordmydesktop.c
diff options
context:
space:
mode:
authorbiocrasher <biocrasher@f606c939-3180-4ac9-a4b8-4b8779d57d0a>2006-08-09 10:20:15 +0000
committerbiocrasher <biocrasher@f606c939-3180-4ac9-a4b8-4b8779d57d0a>2006-08-09 10:20:15 +0000
commitac6bf554e5f994aa77c7994b602935e41079fdb3 (patch)
treeafcc7928032e4c63d25241dd0f62b308061d48de /recordmydesktop/src/recordmydesktop.c
parenteeb63e1dc2853ddd76f606f34078b29cc5b87b0b (diff)
segfault on no :0.0 environment variable bug fixed,no divisible by 16 width and height shared memory pixmap distortion bug fixed
git-svn-id: https://recordmydesktop.svn.sourceforge.net/svnroot/recordmydesktop/trunk@39 f606c939-3180-4ac9-a4b8-4b8779d57d0a
Diffstat (limited to 'recordmydesktop/src/recordmydesktop.c')
-rw-r--r--recordmydesktop/src/recordmydesktop.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/recordmydesktop/src/recordmydesktop.c b/recordmydesktop/src/recordmydesktop.c
index 41a8bca..50e6e78 100644
--- a/recordmydesktop/src/recordmydesktop.c
+++ b/recordmydesktop/src/recordmydesktop.c
@@ -39,8 +39,12 @@ int main(int argc,char **argv){
if(ParseArgs(argc,argv,&pdata.args)){
exit(1);
}
- pdata.dpy = XOpenDisplay(pdata.args.display);
-
+ if(pdata.args.display!=NULL)
+ pdata.dpy = XOpenDisplay(pdata.args.display);
+ else{
+ fprintf(stderr,"No display specified for connection!\n");
+ exit(1);
+ }
if (pdata.dpy == NULL) {
fprintf(stderr, "Cannot connect to X server %s\n",pdata.args.display);
exit(1);
© All Rights Reserved