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,10 +1467,8 @@ GpStatus WINGDIPAPI GdipPlayMetafileRecord(GDIPCONST GpMetafile *metafile, ...@@ -1469,10 +1467,8 @@ 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) if (record)
{ {
...@@ -1480,13 +1476,18 @@ GpStatus WINGDIPAPI GdipPlayMetafileRecord(GDIPCONST GpMetafile *metafile, ...@@ -1480,13 +1476,18 @@ GpStatus WINGDIPAPI GdipPlayMetafileRecord(GDIPCONST GpMetafile *metafile,
record->nSize = dataSize + 8; record->nSize = dataSize + 8;
memcpy(record->dParm, data, dataSize); memcpy(record->dParm, data, dataSize);
PlayEnhMetaFileRecord(metafile->playback_dc, metafile->handle_table, if(PlayEnhMetaFileRecord(metafile->playback_dc, metafile->handle_table,
record, metafile->handle_count); record, metafile->handle_count) == 0)
ERR("PlayEnhMetaFileRecord failed\n");
heap_free(record); heap_free(record);
} }
else else
return OutOfMemory; return OutOfMemory;
break;
}
}
} }
} }
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