Andrew Eikum : gdiplus: Don' t modify container list if container restoration fails.
Alexandre Julliard
julliard at winehq.org
Wed Jul 8 14:35:55 CDT 2009
Module: wine
Branch: master
Commit: a06c2570e5870d1c5538760442956fedab1594ea
URL: http://source.winehq.org/git/wine.git/?a=commit;h=a06c2570e5870d1c5538760442956fedab1594ea
Author: Andrew Eikum <andrew at brightnightgames.com>
Date: Tue Jul 7 22:30:29 2009 -0500
gdiplus: Don't modify container list if container restoration fails.
---
dlls/gdiplus/graphics.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c
index b81a984..12f1e26 100644
--- a/dlls/gdiplus/graphics.c
+++ b/dlls/gdiplus/graphics.c
@@ -3400,7 +3400,7 @@ GpStatus WINGDIPAPI GdipComment(GpGraphics *graphics, UINT sizeData, GDIPCONST B
return NotImplemented;
}
-GpStatus WINGDIPAPI GdipEndContainer(GpGraphics *graphics, GraphicsState state)
+GpStatus WINGDIPAPI GdipEndContainer(GpGraphics *graphics, GraphicsContainer state)
{
GpStatus sts;
GraphicsContainerItem *container, *container2;
@@ -3419,6 +3419,10 @@ GpStatus WINGDIPAPI GdipEndContainer(GpGraphics *graphics, GraphicsState state)
if(&container->entry == &graphics->containers)
return Ok;
+ sts = restore_container(graphics, container);
+ if(sts != Ok)
+ return sts;
+
/* remove all of the containers on top of the found container */
LIST_FOR_EACH_ENTRY_SAFE(container, container2, &graphics->containers, GraphicsContainerItem, entry){
if(container->contid == state)
@@ -3428,10 +3432,9 @@ GpStatus WINGDIPAPI GdipEndContainer(GpGraphics *graphics, GraphicsState state)
}
list_remove(&container->entry);
- sts = restore_container(graphics, container);
delete_container(container);
- return sts;
+ return Ok;
}
GpStatus WINGDIPAPI GdipScaleWorldTransform(GpGraphics *graphics, REAL sx,
More information about the wine-cvs
mailing list