diff --git a/dlls/xmllite/tests/writer.c b/dlls/xmllite/tests/writer.c index e6ffbeb008e..a5d5b31a22b 100644 --- a/dlls/xmllite/tests/writer.c +++ b/dlls/xmllite/tests/writer.c @@ -89,7 +89,6 @@ todo_wine ok(hr == exp_hr, "got 0x%08x, expected 0x%08x\n", hr, exp_hr); hr = IXmlWriter_WriteEndElement(writer); -todo_wine ok(hr == exp_hr, "got 0x%08x, expected 0x%08x\n", hr, exp_hr); todo_wine { diff --git a/dlls/xmllite/writer.c b/dlls/xmllite/writer.c index 90e965f7c20..0e55b42038e 100644 --- a/dlls/xmllite/writer.c +++ b/dlls/xmllite/writer.c @@ -784,6 +784,14 @@ static HRESULT WINAPI xmlwriter_WriteEndElement(IXmlWriter *iface) TRACE("%p\n", This); + switch (This->state) + { + case XmlWriterState_Initial: + return E_UNEXPECTED; + default: + ; + } + element = pop_element(This); if (!element) return WR_E_INVALIDACTION;