explorer: Check return of IShellFolder_GetDisplayNameOf (Coverity)
André Hentschel
nerv at dawncrow.de
Sun Jan 19 13:55:39 CST 2014
1157431
---
programs/explorer/startmenu.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/programs/explorer/startmenu.c b/programs/explorer/startmenu.c
index 745e590..e9c651b 100644
--- a/programs/explorer/startmenu.c
+++ b/programs/explorer/startmenu.c
@@ -151,8 +151,8 @@ static struct menu_item* add_shell_item(struct menu_item* parent, LPITEMIDLIST p
{
STRRET strret;
- IShellFolder_GetDisplayNameOf(parent->folder, pidl, SHGDN_INFOLDER, &strret);
- StrRetToStrW(&strret, NULL, &item->displayname);
+ if (SUCCEEDED(IShellFolder_GetDisplayNameOf(parent->folder, pidl, SHGDN_INFOLDER, &strret)))
+ StrRetToStrW(&strret, NULL, &item->displayname);
flags = SFGAO_FOLDER;
IShellFolder_GetAttributesOf(parent->folder, 1, (LPCITEMIDLIST*)&pidl, &flags);
--
1.8.1.2
More information about the wine-patches
mailing list