Per Johansson : winemenubuilder: Don' t treat empty string as a valid icon file name.
Alexandre Julliard
julliard at winehq.org
Thu Sep 20 15:05:37 CDT 2012
Module: wine
Branch: master
Commit: b8ee44581e4ca547c15fbe6efef00006d8154ba0
URL: http://source.winehq.org/git/wine.git/?a=commit;h=b8ee44581e4ca547c15fbe6efef00006d8154ba0
Author: Per Johansson <per at morth.org>
Date: Wed Sep 19 21:48:16 2012 +0200
winemenubuilder: Don't treat empty string as a valid icon file name.
---
programs/winemenubuilder/winemenubuilder.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/programs/winemenubuilder/winemenubuilder.c b/programs/winemenubuilder/winemenubuilder.c
index 3746bd0..8e2320c 100644
--- a/programs/winemenubuilder/winemenubuilder.c
+++ b/programs/winemenubuilder/winemenubuilder.c
@@ -2978,6 +2978,7 @@ static BOOL InvokeShellLinkerForURL( IUniformResourceLocatorW *url, LPCWSTR link
PROPSPEC ps[2];
PROPVARIANT pv[2];
char *start_path = NULL;
+ BOOL has_icon = FALSE;
if ( !link )
{
@@ -3041,8 +3042,9 @@ static BOOL InvokeShellLinkerForURL( IUniformResourceLocatorW *url, LPCWSTR link
hr = IPropertyStorage_ReadMultiple(pPropStg, 2, ps, pv);
if (SUCCEEDED(hr))
{
- if (pv[0].vt == VT_LPWSTR && pv[0].u.pwszVal)
+ if (pv[0].vt == VT_LPWSTR && pv[0].u.pwszVal && pv[0].u.pwszVal[0])
{
+ has_icon = TRUE;
icon_name = extract_icon( pv[0].u.pwszVal, pv[1].u.iVal, NULL, bWait );
WINE_TRACE("URL icon path: %s icon index: %d icon name: %s\n", wine_dbgstr_w(pv[0].u.pwszVal), pv[1].u.iVal, icon_name);
@@ -3056,7 +3058,7 @@ static BOOL InvokeShellLinkerForURL( IUniformResourceLocatorW *url, LPCWSTR link
}
/* fail - try once again after parent process exit */
- if( !icon_name )
+ if( has_icon && !icon_name )
{
if (bWait)
{
More information about the wine-cvs
mailing list