Alasdair Sinclair : shell32/test: Prevent crash on cleanup if tests fail.

Alexandre Julliard julliard at winehq.org
Mon Sep 27 11:29:37 CDT 2010


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

Author: Alasdair Sinclair <alasdairsinc at gmail.com>
Date:   Sat Sep 25 23:14:44 2010 +0100

shell32/test: Prevent crash on cleanup if tests fail.

---

 dlls/shell32/tests/shlfolder.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/dlls/shell32/tests/shlfolder.c b/dlls/shell32/tests/shlfolder.c
index 639b092..5ddb973 100644
--- a/dlls/shell32/tests/shlfolder.c
+++ b/dlls/shell32/tests/shlfolder.c
@@ -2549,7 +2549,7 @@ static void test_SHGetItemFromDataObject(void)
 static void test_ShellItemCompare(void)
 {
     IShellItem *psi[9]; /* a\a, a\b, a\c, b\a, .. */
-    IShellItem *psi_a, *psi_b, *psi_c;
+    IShellItem *psi_a = NULL, *psi_b = NULL, *psi_c = NULL;
     IShellFolder *psf_desktop, *psf_current;
     LPITEMIDLIST pidl_cwd;
     WCHAR curdirW[MAX_PATH];
@@ -2620,7 +2620,6 @@ static void test_ShellItemCompare(void)
     }
 
     /* Generate ShellItems for the folders */
-    psi_a = psi_b = psi_c = NULL;
     hr = IShellItem_GetParent(psi[0], &psi_a);
     ok(hr == S_OK, "Got 0x%08x\n", hr);
     if(FAILED(hr)) failed = TRUE;




More information about the wine-cvs mailing list