[SHELL32_APITEST] DragDrop: Add NULL check of pDropTarget
authorKatayama Hirofumi MZ <katayama.hirofumi.mz@gmail.com>
Sun, 24 Nov 2019 13:48:06 +0000 (22:48 +0900)
committerKatayama Hirofumi MZ <katayama.hirofumi.mz@gmail.com>
Sun, 24 Nov 2019 13:48:15 +0000 (22:48 +0900)
modules/rostests/apitests/shell32/DragDrop.cpp

index 8e35834..c292353 100644 (file)
@@ -272,6 +272,19 @@ static void DoTestEntry(const TEST_ENTRY *pEntry)
     CoTaskMemFree(pidl);
     ok_long(hr, S_OK);
 
+    if (!pDropTarget)
+    {
+        skip("pDropTarget was NULL\n");
+
+        // clean up
+        DeleteFileW(s_szSrcTestFile);
+        DeleteFileW(s_szDestTestFile);
+        DoDeleteSpecW(s_szDestLinkSpec);
+        ILFree(pidlDesktop);
+
+        return;
+    }
+
     // DragEnter
     POINTL ptl = { 0, 0 };
     DWORD dwKeyState = pEntry->dwKeyState;