mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-07 11:46:30 +02:00
[ImageResizer]Fix use without initializing warning (#29236)
[ImageResizer]Fix use without initializing warn
This commit is contained in:
@@ -392,8 +392,14 @@ HRESULT __stdcall CContextMenuHandler::GetState(IShellItemArray* psiItemArray, B
|
||||
PERCEIVED type;
|
||||
PERCEIVEDFLAG flag;
|
||||
IShellItem* shellItem;
|
||||
|
||||
//Check extension of first item in the list (the item which is right-clicked on)
|
||||
psiItemArray->GetItemAt(0, &shellItem);
|
||||
HRESULT getItemAtResult = psiItemArray->GetItemAt(0, &shellItem);
|
||||
if(!SUCCEEDED(getItemAtResult)) {
|
||||
// Avoid crashes in the following code.
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
LPTSTR pszPath;
|
||||
// Retrieves the entire file system path of the file from its shell item
|
||||
HRESULT getDisplayResult = shellItem->GetDisplayName(SIGDN_FILESYSPATH, &pszPath);
|
||||
|
||||
Reference in New Issue
Block a user