From b27c322b8d6389eb1042b27bcc61d1753c57d83c Mon Sep 17 00:00:00 2001 From: "Jerry.Kirk%Nexwarecorp.com" Date: Mon, 6 Dec 1999 04:53:52 +0000 Subject: [PATCH] Fixed ::Union by copying the tile list before MergeAdd r=kedl --- gfx/src/photon/nsRegionPh.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/gfx/src/photon/nsRegionPh.cpp b/gfx/src/photon/nsRegionPh.cpp index 5a75649a514e..87acf2ef9d27 100644 --- a/gfx/src/photon/nsRegionPh.cpp +++ b/gfx/src/photon/nsRegionPh.cpp @@ -47,12 +47,11 @@ static NS_DEFINE_IID(kRegionIID, NS_IREGION_IID); static void DumpTiles(PhTile_t *t) { #ifdef DEBUG_REGION - int count=1; while(t) { - //printf("Tile %d is t=<%p> t->next=<%p> (%d, %d) - (%d,%d)\n", count, t, t->next, tulx, tuly, tlrx, tlry); + printf("Tile %d is t=<%p> t->next=<%p> (%d, %d) - (%d,%d)\n", count, t, t->next, tulx, tuly, tlrx, tlry); PR_LOG(PhGfxLog, PR_LOG_DEBUG, ("Tile %d is t=<%p> t->next=<%p> (%d, %d) - (%d,%d)\n", count, t, t->next, tulx, tuly, tlrx, tlry)); t = t->next; count++; @@ -174,8 +173,7 @@ void nsRegionPh :: Union(const nsIRegion &aRegion) int added; PhTile_t *tiles; aRegion.GetNativeRegion((void*&)tiles); - - mRegion = PhAddMergeTiles(mRegion, tiles, &added); + mRegion = PhAddMergeTiles(mRegion, PhCopyTiles(tiles), &added); }