mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-24 08:04:30 +00:00
panoramiX: XineramaGetImageData(): scope sizeNeeded variable
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
committed by
Enrico Weigelt
parent
03f3388745
commit
1193e294e7
@@ -1138,12 +1138,10 @@ XineramaGetImageData(DrawablePtr *pDrawables,
|
||||
{
|
||||
RegionRec SrcRegion, GrabRegion;
|
||||
BoxRec SrcBox;
|
||||
int size, sizeNeeded;
|
||||
int size = 0;
|
||||
DrawablePtr pDraw = pDrawables[0];
|
||||
char *ScratchMem = NULL;
|
||||
|
||||
size = 0;
|
||||
|
||||
/* find box in logical screen space */
|
||||
SrcBox.x1 = left;
|
||||
SrcBox.y1 = top;
|
||||
@@ -1198,7 +1196,7 @@ XineramaGetImageData(DrawablePtr *pDrawables,
|
||||
int w = pbox->x2 - pbox->x1;
|
||||
int h = pbox->y2 - pbox->y1;
|
||||
int ScratchPitch = PixmapBytePad(w, depth);
|
||||
sizeNeeded = ScratchPitch * h;
|
||||
int sizeNeeded = ScratchPitch * h;
|
||||
|
||||
if (sizeNeeded > size) {
|
||||
char *tmpdata = ScratchMem;
|
||||
|
||||
Reference in New Issue
Block a user