dmloader: Avoid a crash on a NULL string pointer.

Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Michael Stefaniuc 2017-04-27 19:15:27 +02:00 committed by Alexandre Julliard
parent 3845b0bb73
commit ed6ee0f815
1 changed files with 6 additions and 2 deletions

View File

@ -536,12 +536,16 @@ static HRESULT WINAPI IDirectMusicLoaderImpl_ScanDirectory(IDirectMusicLoader8 *
WCHAR wszSearchString[MAX_PATH];
WCHAR *p;
HRESULT result;
TRACE("(%p, %s, %p, %p)\n", This, debugstr_dmguid(rguidClass), pwzFileExtension, pwzScanFileName);
TRACE("(%p, %s, %s, %s)\n", This, debugstr_dmguid(rguidClass), debugstr_w(pwzFileExtension),
debugstr_w(pwzScanFileName));
if (IsEqualGUID (rguidClass, &GUID_DirectMusicAllTypes) || !DMUSIC_IsValidLoadableClass(rguidClass)) {
ERR(": rguidClass invalid CLSID\n");
return REGDB_E_CLASSNOTREG;
}
if (!pwzFileExtension)
return S_FALSE;
/* get search path for given class */
DMUSIC_GetLoaderSettings (iface, rguidClass, wszSearchString, NULL);