From 14478887df3ce4166bf0dd384071cb9ed9bb9d03 Mon Sep 17 00:00:00 2001 From: Katayama Hirofumi MZ Date: Sun, 24 Nov 2019 22:48:06 +0900 Subject: [PATCH] [SHELL32_APITEST] DragDrop: Add NULL check of pDropTarget --- modules/rostests/apitests/shell32/DragDrop.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/modules/rostests/apitests/shell32/DragDrop.cpp b/modules/rostests/apitests/shell32/DragDrop.cpp index 8e35834490f..c292353d86a 100644 --- a/modules/rostests/apitests/shell32/DragDrop.cpp +++ b/modules/rostests/apitests/shell32/DragDrop.cpp @@ -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;