If an attempt to create an shm pixmap in XCreateDrawable fails
then it ends up with the shmid == -1. This means the get image
path needs to fallback so return false in this case to use the
non-shm get image path.
Fixes: 02c3dad0f3b4 ("Call shmget() with permission 0600 instead of 0777")
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3823>
if (!XCreateDrawable(prp, shmid, dpy))
return GL_FALSE;
}
+
+ if (prp->shminfo.shmid == -1)
+ return GL_FALSE;
readable = pread->xDrawable;
ximage = prp->ximage;