Author: gadamopoulos
Date: Thu Jul 25 12:57:56 2013
New Revision: 59580
URL:
http://svn.reactos.org/svn/reactos?rev=59580&view=rev
Log:
[shell32]
- Do not call OnDefaultCommand when there is no selected item in the shell view
Modified:
trunk/reactos/dll/win32/shell32/shlview.cpp
Modified: trunk/reactos/dll/win32/shell32/shlview.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shlview.…
==============================================================================
--- trunk/reactos/dll/win32/shell32/shlview.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/shlview.cpp [iso-8859-1] Thu Jul 25 12:57:56 2013
@@ -1102,6 +1102,10 @@
UINT uCommand;
HRESULT hResult;
+ cidl = ListView_GetSelectedCount(hWndList);
+ if (cidl == 0)
+ return S_OK;
+
hResult = OnDefaultCommand();
if (hResult == S_OK)
return hResult;
@@ -1175,7 +1179,7 @@
if (!hMenu)
return E_FAIL;
- GetSelections();
+ cidl = ListView_GetSelectedCount(hWndList);
hResult = GetItemObject( cidl ? SVGIO_SELECTION : SVGIO_BACKGROUND, IID_IContextMenu,
(LPVOID *)&pCM);
if (FAILED( hResult))