summaryrefslogtreecommitdiff
path: root/recordmydesktop/src/parseargs.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/parseargs.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/parseargs.c')
-rw-r--r--recordmydesktop/src/parseargs.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/recordmydesktop/src/parseargs.c b/recordmydesktop/src/parseargs.c
index 55dfbcd..cc64fc2 100644
--- a/recordmydesktop/src/parseargs.c
+++ b/recordmydesktop/src/parseargs.c
@@ -133,7 +133,8 @@ int ParseArgs(int argc,char **argv,ProgArgs *arg_return){
}
else if(!strcmp(argv[i],"-display")){
if(i+1<argc){
- free(arg_return->display);
+ if(arg_return->display!=NULL)
+ free(arg_return->display);
arg_return->display=malloc(strlen(argv[i+1])+1);
strcpy(arg_return->display,argv[i+1]);
}
© All Rights Reserved