Commit 7860d11e authored by Andrew Eikum's avatar Andrew Eikum Committed by Alexandre Julliard

gdiplus: Don't call PlayEnhMetaFileRecord for records handled by gdiplus.

parent c51b41f9
...@@ -1423,8 +1423,6 @@ GpStatus WINGDIPAPI GdipPlayMetafileRecord(GDIPCONST GpMetafile *metafile, ...@@ -1423,8 +1423,6 @@ GpStatus WINGDIPAPI GdipPlayMetafileRecord(GDIPCONST GpMetafile *metafile,
/* regular EMF record */ /* regular EMF record */
if (metafile->playback_dc) if (metafile->playback_dc)
{ {
ENHMETARECORD *record;
switch (recordType) switch (recordType)
{ {
case EMR_SETMAPMODE: case EMR_SETMAPMODE:
...@@ -1469,24 +1467,27 @@ GpStatus WINGDIPAPI GdipPlayMetafileRecord(GDIPCONST GpMetafile *metafile, ...@@ -1469,24 +1467,27 @@ GpStatus WINGDIPAPI GdipPlayMetafileRecord(GDIPCONST GpMetafile *metafile,
return Ok; return Ok;
} }
default: default:
break; {
} ENHMETARECORD *record = heap_alloc_zero(dataSize + 8);
record = heap_alloc_zero(dataSize + 8); if (record)
{
record->iType = recordType;
record->nSize = dataSize + 8;
memcpy(record->dParm, data, dataSize);
if (record) if(PlayEnhMetaFileRecord(metafile->playback_dc, metafile->handle_table,
{ record, metafile->handle_count) == 0)
record->iType = recordType; ERR("PlayEnhMetaFileRecord failed\n");
record->nSize = dataSize + 8;
memcpy(record->dParm, data, dataSize);
PlayEnhMetaFileRecord(metafile->playback_dc, metafile->handle_table, heap_free(record);
record, metafile->handle_count); }
else
return OutOfMemory;
heap_free(record); break;
}
} }
else
return OutOfMemory;
} }
} }
else else
......
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