From 2eab8afaa9f108abf51210be5940696e121136ec Mon Sep 17 00:00:00 2001 From: Robert Lunnon Date: Tue, 6 May 2003 18:36:54 +0000 Subject: [PATCH] Eliminate segfault due to NULL This->sIcoPath. --- dlls/shell32/shelllink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/shell32/shelllink.c b/dlls/shell32/shelllink.c index 5143ff3fd1e..423a8204601 100644 --- a/dlls/shell32/shelllink.c +++ b/dlls/shell32/shelllink.c @@ -697,7 +697,7 @@ static HRESULT WINAPI IPersistFile_fnSave(IPersistFile* iface, LPCOLESTR pszFile } buffer = HeapAlloc(GetProcessHeap(), 0, MAX_PATH * 3 + (This->sArgs ? strlen(This->sArgs) : 0) + (This->sDescription ? strlen(This->sDescription) : 0) + 200); - sprintf(buffer, "link:%s\xff*%s\xff%d\xff%s\xff%s\xff%s", This->sPath, This->sIcoPath, This->iIcoNdx, + sprintf(buffer, "link:%s\xff*%s\xff%d\xff%s\xff%s\xff%s", This->sPath, This->sIcoPath ? This->sIcoPath : "", This->iIcoNdx, This->sArgs ? This->sArgs : "", This->sDescription ? This->sDescription : "", This->sWorkDir ? This->sWorkDir : ""); if (RegSetValueExA(hRunOnce, ascii_filename, 0, REG_SZ, buffer, strlen(buffer) + 1) != ERROR_SUCCESS)