msi: Handle NULL component correctly in MsiEnumComponentCostsW.

oldstable
Hans Leidekker 2011-05-06 14:39:01 +02:00 committed by Alexandre Julliard
parent 3ef0a28faf
commit 2afd65f69b
1 changed files with 2 additions and 3 deletions

View File

@ -1844,13 +1844,12 @@ UINT WINAPI MsiEnumComponentCostsW( MSIHANDLE handle, LPCWSTR component, DWORD i
{
HRESULT hr;
IWineMsiRemotePackage *remote_package;
BSTR bname;
BSTR bname = NULL;
if (!(remote_package = (IWineMsiRemotePackage *)msi_get_remote( handle )))
return ERROR_INVALID_HANDLE;
bname = SysAllocString( component );
if (!bname)
if (component && !(bname = SysAllocString( component )))
{
IWineMsiRemotePackage_Release( remote_package );
return ERROR_OUTOFMEMORY;