diff options
Diffstat (limited to 'recordmydesktop')
-rw-r--r-- | recordmydesktop/src/initialize_data.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/recordmydesktop/src/initialize_data.c b/recordmydesktop/src/initialize_data.c index c65fcf1..8223f19 100644 --- a/recordmydesktop/src/initialize_data.c +++ b/recordmydesktop/src/initialize_data.c @@ -121,10 +121,14 @@ int InitializeData(ProgData *pdata, &pdata->shminfo, pdata->brwin.rgeom.width, pdata->brwin.rgeom.height); - pdata->shminfo.shmid=shmget (IPC_PRIVATE, - pdata->shimage->bytes_per_line* - pdata->shimage->height, - IPC_CREAT|0777); + pdata->shminfo.shmid=shmget(IPC_PRIVATE, + pdata->shimage->bytes_per_line* + pdata->shimage->height, + IPC_CREAT|0777); + if(shminfo->shmid==-1){ + fprintf(stderr,"Failed to obtain Shared Memory segment!\n"); + return 12; + } pdata->shminfo.shmaddr=pdata->shimage->data=shmat(pdata->shminfo.shmid, NULL,0); pdata->shminfo.readOnly = False; |