Eliminate segfault due to NULL This->sIcoPath.

This commit is contained in:
Robert Lunnon 2003-05-06 18:36:54 +00:00 committed by Alexandre Julliard
parent 23f5789502
commit 2eab8afaa9
1 changed files with 1 additions and 1 deletions

View File

@ -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)