Alistair Leslie-Hughes : msxml: Allow insertBefore to have a NULL output parameter.

Alexandre Julliard julliard at winehq.org
Thu Nov 15 07:45:04 CST 2007


Module: wine
Branch: master
Commit: 7fbf828afa36500c5294262dde5ae5d34f7f9b90
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=7fbf828afa36500c5294262dde5ae5d34f7f9b90

Author: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
Date:   Wed Nov 14 16:05:17 2007 +1100

msxml: Allow insertBefore to have a NULL output parameter.

---

 dlls/msxml3/node.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/dlls/msxml3/node.c b/dlls/msxml3/node.c
index 61d5ab2..298deff 100644
--- a/dlls/msxml3/node.c
+++ b/dlls/msxml3/node.c
@@ -373,7 +373,7 @@ static HRESULT WINAPI xmlnode_insertBefore(
 
     TRACE("(%p)->(%p,var,%p)\n",This,newChild,outNewChild);
 
-    if (!(newChild && outNewChild))
+    if (!newChild)
         return E_INVALIDARG;
 
     switch(V_VT(&refChild))
@@ -414,7 +414,9 @@ static HRESULT WINAPI xmlnode_insertBefore(
 
     IXMLDOMNode_Release(new);
     IXMLDOMNode_AddRef(newChild);
-    *outNewChild = newChild;
+    if(outNewChild)
+        *outNewChild = newChild;
+
     TRACE("ret S_OK\n");
     return S_OK;
 }




More information about the wine-cvs mailing list