exa: more safety
This commit is contained in:
parent
8b652435cd
commit
d573cc46d3
|
@ -336,7 +336,7 @@ ExaDoPrepareAccess(DrawablePtr pDrawable, int index)
|
|||
if (!offscreen) {
|
||||
/* Do we need to allocate our system buffer? */
|
||||
if ((pExaScr->info->flags & EXA_HANDLES_PIXMAPS) && (pExaScr->info->flags & EXA_MIXED_PIXMAPS)) {
|
||||
if (!pExaPixmap->sys_ptr) {
|
||||
if (!pExaPixmap->sys_ptr && !exaPixmapIsPinned(pPixmap)) {
|
||||
pExaPixmap->sys_ptr = malloc(pExaPixmap->sys_pitch * pDrawable->height);
|
||||
if (!pExaPixmap->sys_ptr)
|
||||
FatalError("EXA: malloc failed for size %d bytes\n", pExaPixmap->sys_pitch * pDrawable->height);
|
||||
|
|
|
@ -82,6 +82,7 @@ exaCreatePixmap_mixed(ScreenPtr pScreen, int w, int h, int depth,
|
|||
datasize = h * paddedWidth;
|
||||
|
||||
/* We will allocate the system pixmap later if needed. */
|
||||
pPixmap->devPrivate.ptr = NULL;
|
||||
pExaPixmap->sys_ptr = NULL;
|
||||
pExaPixmap->sys_pitch = paddedWidth;
|
||||
|
||||
|
|
Loading…
Reference in New Issue