From 9ab0eab9e9d8ed09f9c7ce1b7ae4b6107362ff23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Hentschel?= Date: Sun, 19 Jan 2014 20:55:39 +0100 Subject: [PATCH] explorer: Check return of IShellFolder_GetDisplayNameOf (Coverity). --- 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 745e5907ec4..e9c651bb0af 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);