mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-14 19:27:17 +00:00
gdiplus: Copy the compound array in GdipClonePen().
This commit is contained in:
parent
f0525a5ff6
commit
150b8dd013
|
@ -103,6 +103,7 @@ GpStatus WINGDIPAPI GdipClonePen(GpPen *pen, GpPen **clonepen)
|
|||
(*clonepen)->customend = NULL;
|
||||
(*clonepen)->brush = NULL;
|
||||
(*clonepen)->dashes = NULL;
|
||||
(*clonepen)->compound_array = NULL;
|
||||
|
||||
stat = GdipCloneBrush(pen->brush, &(*clonepen)->brush);
|
||||
|
||||
|
@ -121,6 +122,15 @@ GpStatus WINGDIPAPI GdipClonePen(GpPen *pen, GpPen **clonepen)
|
|||
stat = OutOfMemory;
|
||||
}
|
||||
|
||||
if (stat == Ok && pen->compound_array)
|
||||
{
|
||||
(*clonepen)->compound_array = heap_alloc_zero(pen->compound_array_size * sizeof(REAL));
|
||||
if ((*clonepen)->compound_array)
|
||||
memcpy((*clonepen)->compound_array, pen->compound_array, pen->compound_array_size * sizeof(REAL));
|
||||
else
|
||||
stat = OutOfMemory;
|
||||
}
|
||||
|
||||
if (stat != Ok)
|
||||
{
|
||||
GdipDeletePen(*clonepen);
|
||||
|
|
Loading…
Reference in a new issue