Commit e9633ef2 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

gdiplus: Simplify GdipResetImageAttributes(), fix remap table leak (Valgrind).

parent d68dde37
...@@ -279,11 +279,10 @@ GpStatus WINGDIPAPI GdipResetImageAttributes(GpImageAttributes *imageAttr, ...@@ -279,11 +279,10 @@ GpStatus WINGDIPAPI GdipResetImageAttributes(GpImageAttributes *imageAttr,
if(!imageAttr || type >= ColorAdjustTypeCount) if(!imageAttr || type >= ColorAdjustTypeCount)
return InvalidParameter; return InvalidParameter;
memset(&imageAttr->colorkeys[type], 0, sizeof(imageAttr->colorkeys[type]));
memset(&imageAttr->colormatrices[type], 0, sizeof(imageAttr->colormatrices[type])); memset(&imageAttr->colormatrices[type], 0, sizeof(imageAttr->colormatrices[type]));
memset(&imageAttr->colorremaptables[type], 0, sizeof(imageAttr->colorremaptables[type])); GdipSetImageAttributesColorKeys(imageAttr, type, FALSE, 0, 0);
memset(&imageAttr->gamma_enabled[type], 0, sizeof(imageAttr->gamma_enabled[type])); GdipSetImageAttributesRemapTable(imageAttr, type, FALSE, 0, NULL);
memset(&imageAttr->gamma[type], 0, sizeof(imageAttr->gamma[type])); GdipSetImageAttributesGamma(imageAttr, type, FALSE, 0.0);
return Ok; return Ok;
} }
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