From 80819a827a4bc44ca9c247f216d6a0c9bba5f584 Mon Sep 17 00:00:00 2001 From: iovar Date: Wed, 5 Dec 2007 14:11:44 +0000 Subject: 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 --- recordmydesktop/src/get_frame.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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, -- cgit v1.2.3