summaryrefslogtreecommitdiff
path: root/recordmydesktop
diff options
context:
space:
mode:
authoriovar <iovar@f606c939-3180-4ac9-a4b8-4b8779d57d0a>2007-12-05 14:11:44 +0000
committeriovar <iovar@f606c939-3180-4ac9-a4b8-4b8779d57d0a>2007-12-05 14:11:44 +0000
commit80819a827a4bc44ca9c247f216d6a0c9bba5f584 (patch)
tree97a3b74c3afab6bc1cbe3adb953bdcf8e10b2a1d /recordmydesktop
parent7d077ad3d11417086eb1cf7414d1177bfdd8219a (diff)
src/get_frame.c: fix --no-shared pixmap memory allocation
git-svn-id: https://recordmydesktop.svn.sourceforge.net/svnroot/recordmydesktop/trunk@457 f606c939-3180-4ac9-a4b8-4b8779d57d0a
Diffstat (limited to 'recordmydesktop')
-rw-r--r--recordmydesktop/src/get_frame.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/recordmydesktop/src/get_frame.c b/recordmydesktop/src/get_frame.c
index fefb6be..cb473b6 100644
--- a/recordmydesktop/src/get_frame.c
+++ b/recordmydesktop/src/get_frame.c
@@ -32,6 +32,9 @@ int FirstFrame(ProgData *pdata,XImage **image,XShmSegmentInfo *shminfo,
char **pxl_data){
if((pdata->args.noshared)){
+
+ *pxl_data=(char *)malloc(pdata->brwin.nbytes);
+
(*image)=XCreateImage(pdata->dpy,
pdata->specs.visual,
pdata->specs.depth,
@@ -49,7 +52,6 @@ int FirstFrame(ProgData *pdata,XImage **image,XShmSegmentInfo *shminfo,
pdata->brwin.rgeom.y,
pdata->brwin.rgeom.width,
pdata->brwin.rgeom.height);
- *pxl_data=(char *)malloc(pdata->brwin.nbytes);
}
else{
(*image)=XShmCreateImage(pdata->dpy,
© All Rights Reserved