From 5960e7c93c164d9c5e7f175c7c1453b767fc4cf0 Mon Sep 17 00:00:00 2001 From: Mike McCormack Date: Fri, 22 Apr 2005 19:06:12 +0000 Subject: [PATCH] MSI advertised shortcuts don't require a product ID. --- dlls/shell32/shelllink.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/dlls/shell32/shelllink.c b/dlls/shell32/shelllink.c index aa84d92a0f6..f73c88016c8 100644 --- a/dlls/shell32/shelllink.c +++ b/dlls/shell32/shelllink.c @@ -1996,6 +1996,9 @@ static LPWSTR ShellLink_GetAdvertisedArg(LPCWSTR str) LPCWSTR p; DWORD len; + if( !str ) + return NULL; + p = strchrW( str, ':' ); if( !p ) return NULL; @@ -2057,8 +2060,8 @@ static HRESULT ShellLink_SetAdvertiseInfo(IShellLinkImpl *This, LPCWSTR str) return E_FAIL; } - /* we have to have at least one of these two for an advertised shortcut */ - if( !szComponent && !szProduct ) + /* we have to have a component for an advertised shortcut */ + if( !szComponent ) return E_FAIL; This->sComponent = ShellLink_GetAdvertisedArg( szComponent );