xmllite/writer: Properly fail on initial state in WriteEndElement().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
86a7dd99e0
commit
6ca1ebdd25
|
@ -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 {
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue