Paul Vriens : ole32/tests: Fix crash on W2K and below.
Alexandre Julliard
julliard at winehq.org
Tue Jun 10 06:28:04 CDT 2008
Module: wine
Branch: master
Commit: 470a0a22f414b56f16a9e9934a7be6a494028823
URL: http://source.winehq.org/git/wine.git/?a=commit;h=470a0a22f414b56f16a9e9934a7be6a494028823
Author: Paul Vriens <paul.vriens.wine at gmail.com>
Date: Tue Jun 10 10:10:18 2008 +0200
ole32/tests: Fix crash on W2K and below.
---
dlls/ole32/tests/ole2.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/dlls/ole32/tests/ole2.c b/dlls/ole32/tests/ole2.c
index 88b58e7..dbddd43 100644
--- a/dlls/ole32/tests/ole2.c
+++ b/dlls/ole32/tests/ole2.c
@@ -783,7 +783,8 @@ static void test_OleCreate(IStorage *pStorage)
trace("OleCreate with OLERENDER_FORMAT:\n");
hr = OleCreate(&CLSID_Equation3, &IID_IOleObject, OLERENDER_FORMAT, &formatetc, (IOleClientSite *)0xdeadbeef, pStorage, (void **)&pObject);
ok_ole_success(hr, "OleCreate");
- IOleObject_Release(pObject);
+ if (pObject)
+ IOleObject_Release(pObject);
ok(!*expected_method_list, "Method sequence starting from %s not called\n", *expected_method_list);
expected_method_list = methods_olerender_asis;
@@ -839,7 +840,8 @@ static void test_OleLoad(IStorage *pStorage)
trace("OleLoad:\n");
hr = OleLoad(pStorage, &IID_IOleObject, (IOleClientSite *)0xdeadbeef, (void **)&pObject);
ok_ole_success(hr, "OleLoad");
- IOleObject_Release(pObject);
+ if (pObject)
+ IOleObject_Release(pObject);
ok(!*expected_method_list, "Method sequence starting from %s not called\n", *expected_method_list);
}
More information about the wine-cvs
mailing list