From 58fdf4bb36f659d3abca17a66c4d14973addbcd3 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 git-svn-id: svn://10.0.0.236/trunk@55396 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/gfx/src/photon/nsRegionPh.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/mozilla/gfx/src/photon/nsRegionPh.cpp b/mozilla/gfx/src/photon/nsRegionPh.cpp index 5a75649a514..87acf2ef9d2 100644 --- a/mozilla/gfx/src/photon/nsRegionPh.cpp +++ b/mozilla/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); }