From: Vincent Povirk vincent@codeweavers.com
--- dlls/gdiplus/metafile.c | 3 +++ dlls/gdiplus/tests/metafile.c | 3 +++ 2 files changed, 6 insertions(+)
diff --git a/dlls/gdiplus/metafile.c b/dlls/gdiplus/metafile.c index 3fdbc69fdc5..f9a9ab750f0 100644 --- a/dlls/gdiplus/metafile.c +++ b/dlls/gdiplus/metafile.c @@ -4031,6 +4031,9 @@ GpStatus WINGDIPAPI GdipSetMetafileDownLevelRasterizationLimit(GpMetafile *metaf if (!metafile) return InvalidParameter;
+ if (!metafile->record_dc) + return WrongState; + metafile->limit_dpi = limitDpi;
return Ok; diff --git a/dlls/gdiplus/tests/metafile.c b/dlls/gdiplus/tests/metafile.c index b9dc33fce35..82854d4240c 100644 --- a/dlls/gdiplus/tests/metafile.c +++ b/dlls/gdiplus/tests/metafile.c @@ -445,6 +445,9 @@ static void test_empty(void) expect(WrongState, stat); expect(0xdeadbeef, limit_dpi);
+ stat = GdipSetMetafileDownLevelRasterizationLimit(metafile, 1); + expect(WrongState, stat); + check_metafile(metafile, empty_records, "empty metafile", dst_points, &frame, UnitPixel);
sync_metafile(&metafile, "empty.emf");