Mikołaj Zalewski : msxml3/tests: Avoid a crash that happens on some native systems.

Alexandre Julliard julliard at wine.codeweavers.com
Thu Jul 19 07:59:52 CDT 2007


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

Author: Mikołaj Zalewski <mikolaj at zalewski.pl>
Date:   Thu Jul 12 00:11:59 2007 +0200

msxml3/tests: Avoid a crash that happens on some native systems.

---

 dlls/msxml3/tests/xmldoc.c |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/dlls/msxml3/tests/xmldoc.c b/dlls/msxml3/tests/xmldoc.c
index 0c68896..feada7c 100644
--- a/dlls/msxml3/tests/xmldoc.c
+++ b/dlls/msxml3/tests/xmldoc.c
@@ -268,11 +268,14 @@ static void test_createElement(void)
     ok(hr == S_OK, "Expected S_OK, got %d\n", hr);
     ok(element != NULL, "Expected non-NULL element\n");
 
-    hr = IXMLElement_get_type(element, &type);
-    ok(hr == S_OK, "Expected S_OK, got %d\n", hr);
-    ok(type == XMLELEMTYPE_OTHER, "Expected XMLELEMTYPE_OTHER, got %ld\n", type);
+    if (element != NULL)
+    {
+        hr = IXMLElement_get_type(element, &type);
+        ok(hr == S_OK, "Expected S_OK, got %d\n", hr);
+        ok(type == XMLELEMTYPE_OTHER, "Expected XMLELEMTYPE_OTHER, got %ld\n", type);
 
-    IXMLElement_Release(element);
+        IXMLElement_Release(element);
+    }
 
     /* invalid vName type */
     V_VT(&vType) = VT_I4;




More information about the wine-cvs mailing list