diff --git a/win32ss/user/user32/misc/exticon.c b/win32ss/user/user32/misc/exticon.c index d3e18b0891..9d983e6ea6 100644 --- a/win32ss/user/user32/misc/exticon.c +++ b/win32ss/user/user32/misc/exticon.c @@ -285,9 +285,15 @@ static UINT ICO_ExtractIconExW( WCHAR szExePath[MAX_PATH]; DWORD dwSearchReturn; - TRACE("%s, %d, %d %p 0x%08x\n", debugstr_w(lpszExeFileName), nIconIndex, nIcons, pIconId, flags); + TRACE("%s, %d, %d %p %p 0x%08x\n", debugstr_w(lpszExeFileName), nIconIndex, nIcons, pIconId, RetPtr, flags); #ifdef __REACTOS__ + if (RetPtr == NULL) + { + WARN("File %s not found or path too long\n", debugstr_w(lpszExeFileName)); + return -1; + } + if (RetPtr) *RetPtr = NULL;