dmloader: pObject NULL checks are not necessary (Coverity).

This commit is contained in:
Marcus Meissner 2009-12-11 00:10:02 +01:00 committed by Alexandre Julliard
parent 9815898840
commit 6891b96364
1 changed files with 6 additions and 10 deletions

View File

@ -333,19 +333,15 @@ static HRESULT WINAPI IDirectMusicLoaderImpl_IDirectMusicLoader_GetObject (LPDIR
if (!pObjectEntry) { if (!pObjectEntry) {
pObjectEntry = HeapAlloc (GetProcessHeap (), HEAP_ZERO_MEMORY, sizeof(WINE_LOADER_ENTRY)); pObjectEntry = HeapAlloc (GetProcessHeap (), HEAP_ZERO_MEMORY, sizeof(WINE_LOADER_ENTRY));
DM_STRUCT_INIT(&pObjectEntry->Desc); DM_STRUCT_INIT(&pObjectEntry->Desc);
if (pObject) {
DMUSIC_CopyDescriptor (&pObjectEntry->Desc, &GotDesc); DMUSIC_CopyDescriptor (&pObjectEntry->Desc, &GotDesc);
pObjectEntry->pObject = pObject; pObjectEntry->pObject = pObject;
pObjectEntry->bInvalidDefaultDLS = FALSE; pObjectEntry->bInvalidDefaultDLS = FALSE;
}
list_add_head (This->pObjects, &pObjectEntry->entry); list_add_head (This->pObjects, &pObjectEntry->entry);
} else { } else {
if (pObject) {
DMUSIC_CopyDescriptor (&pObjectEntry->Desc, &GotDesc); DMUSIC_CopyDescriptor (&pObjectEntry->Desc, &GotDesc);
pObjectEntry->pObject = pObject; pObjectEntry->pObject = pObject;
pObjectEntry->bInvalidDefaultDLS = FALSE; pObjectEntry->bInvalidDefaultDLS = FALSE;
} }
}
TRACE(": filled in cache entry\n"); TRACE(": filled in cache entry\n");
} else TRACE(": caching disabled\n"); } else TRACE(": caching disabled\n");