Commit 33ee9fad authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

gdi32: Return error in EndPage if it's called before StartPage.

parent f4d78d53
......@@ -2458,6 +2458,7 @@ INT WINAPI EndPage( HDC hdc )
{
BOOL write = print->flags & WRITE_DEVMODE;
if (!(print->flags & CALL_END_PAGE)) return SP_ERROR;
print->flags = (print->flags & ~(CALL_END_PAGE | WRITE_DEVMODE)) | CALL_START_PAGE;
if (dc_attr->emf)
return spool_end_page( dc_attr, print->printer, print->devmode, write );
......
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