Module: wine Branch: master Commit: 30351482e84d4bdd54439027f96613c50c61f616 URL: http://source.winehq.org/git/wine.git/?a=commit;h=30351482e84d4bdd54439027f9...
Author: Michael Karcher wine@mkarcher.dialup.fu-berlin.de Date: Sun Oct 5 12:12:56 2008 +0200
msxml3: Fail a bit earlier on removeChild(...,NULL,...).
---
dlls/msxml3/node.c | 4 ++-- dlls/msxml3/tests/domdoc.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/msxml3/node.c b/dlls/msxml3/node.c index b4403cb..d9a2a0c 100644 --- a/dlls/msxml3/node.c +++ b/dlls/msxml3/node.c @@ -625,11 +625,11 @@ static HRESULT WINAPI xmlnode_removeChild(
TRACE("%p->(%p, %p)\n", This, childNode, oldChild);
+ if(!childNode) return E_INVALIDARG; + if(oldChild) *oldChild = NULL;
- if(!childNode) return E_INVALIDARG; - hr = IXMLDOMNode_QueryInterface(childNode, &IID_IXMLDOMNode, (LPVOID)&child); if(FAILED(hr)) return hr; diff --git a/dlls/msxml3/tests/domdoc.c b/dlls/msxml3/tests/domdoc.c index b5b543e..c673d98 100644 --- a/dlls/msxml3/tests/domdoc.c +++ b/dlls/msxml3/tests/domdoc.c @@ -1792,7 +1792,7 @@ static void test_removeChild(void) removed_node = (void*)0xdeadbeef; r = IXMLDOMElement_removeChild( element, NULL, &removed_node ); ok( r == E_INVALIDARG, "ret %08x\n", r ); - todo_wine ok( removed_node == (void*)0xdeadbeef, "%p\n", removed_node ); + ok( removed_node == (void*)0xdeadbeef, "%p\n", removed_node );
/* ba_node is a descendant of element, but not a direct child. */ removed_node = (void*)0xdeadbeef;