Commit 150b8dd0 authored by Huw Davies's avatar Huw Davies Committed by Alexandre Julliard

gdiplus: Copy the compound array in GdipClonePen().

parent f0525a5f
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment