Alistair Leslie-Hughes : msxml3: Return E_INVALIDARG when value is NULL.
Alexandre Julliard
julliard at winehq.org
Thu Jan 3 06:43:46 CST 2008
Module: wine
Branch: master
Commit: 7c1a7491ec2a3520fb114977ede5be961ef65ec7
URL: http://source.winehq.org/git/wine.git/?a=commit;h=7c1a7491ec2a3520fb114977ede5be961ef65ec7
Author: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
Date: Thu Jan 3 16:02:36 2008 +1100
msxml3: Return E_INVALIDARG when value is NULL.
---
dlls/msxml3/node.c | 3 +++
dlls/msxml3/tests/domdoc.c | 4 ++++
2 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/dlls/msxml3/node.c b/dlls/msxml3/node.c
index 63f3ad5..7122f7d 100644
--- a/dlls/msxml3/node.c
+++ b/dlls/msxml3/node.c
@@ -219,6 +219,9 @@ static HRESULT WINAPI xmlnode_get_nodeValue(
TRACE("%p %p\n", This, value);
+ if(!value)
+ return E_INVALIDARG;
+
V_BSTR(value) = NULL;
V_VT(value) = VT_NULL;
diff --git a/dlls/msxml3/tests/domdoc.c b/dlls/msxml3/tests/domdoc.c
index c226ad3..9c5e680 100644
--- a/dlls/msxml3/tests/domdoc.c
+++ b/dlls/msxml3/tests/domdoc.c
@@ -545,6 +545,10 @@ static void test_domnode( void )
VariantInit(&var);
ok( V_VT(&var) == VT_EMPTY, "variant init failed\n");
+
+ r = IXMLDOMNode_get_nodeValue( doc, NULL );
+ ok(r == E_INVALIDARG, "get_nodeValue ret %08x\n", r );
+
r = IXMLDOMNode_get_nodeValue( doc, &var );
ok( r == S_FALSE, "nextNode returned wrong code\n");
ok( V_VT(&var) == VT_NULL, "variant wasn't empty\n");
More information about the wine-cvs
mailing list