[xserver-commit] xserver/miext/damage damage.c,1.5,1.6

Keith Packard xserver-commit@pdx.freedesktop.org
Sun, 09 Nov 2003 20:28:29 -0800


Committed by: keithp

Update of /cvs/xserver/xserver/miext/damage
In directory pdx:/tmp/cvs-serv19496/miext/damage

Modified Files:
	damage.c 
Log Message:
2003-11-09  Keith Packard  <keithp@keithp.com>

	* miext/damage/damage.c: (DamageSubtract):
	Variable pClip was used without always being initialized


Index: damage.c
===================================================================
RCS file: /cvs/xserver/xserver/miext/damage/damage.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- damage.c	9 Nov 2003 07:05:59 -0000	1.5
+++ damage.c	10 Nov 2003 04:28:26 -0000	1.6
@@ -1726,10 +1726,10 @@
 	    REGION_INIT (pScren, &pixmapClip, &box, 1);
 	    pClip = &pixmapClip;
 	}
+	REGION_TRANSLATE (pScreen, &pDamage->damage, pDrawable->x, pDrawable->y);
+	REGION_INTERSECT (pScreen, &pDamage->damage, &pDamage->damage, pClip);
+	REGION_TRANSLATE (pScreen, &pDamage->damage, -pDrawable->x, -pDrawable->y);
     }
-    REGION_TRANSLATE (pScreen, &pDamage->damage, pDrawable->x, pDrawable->y);
-    REGION_INTERSECT (pScreen, &pDamage->damage, &pDamage->damage, pClip);
-    REGION_TRANSLATE (pScreen, &pDamage->damage, -pDrawable->x, -pDrawable->y);
     return REGION_NOTEMPTY (pScreen, &pDamage->damage);
 }