Commit 9d47f87b authored by Marcus Meissner's avatar Marcus Meissner Committed by Alexandre Julliard

dmstyle: Another NULL ptr check added (Coverity).

parent 55ae86cc
......@@ -500,7 +500,7 @@ static HRESULT IDirectMusicStyle8Impl_IPersistStream_ParsePartRefList (LPPERSIST
case DMUS_FOURCC_PARTREF_CHUNK: {
TRACE_(dmfile)(": PartRef chunk\n");
pNewItem = HeapAlloc (GetProcessHeap (), HEAP_ZERO_MEMORY, sizeof(DMUS_PRIVATE_STYLE_PARTREF_ITEM));
if (NULL == pNewItem) {
if (!pNewItem) {
ERR(": no more memory\n");
return E_OUTOFMEMORY;
}
......@@ -523,6 +523,10 @@ static HRESULT IDirectMusicStyle8Impl_IPersistStream_ParsePartRefList (LPPERSIST
ListCount[1] += sizeof(FOURCC) + sizeof(DWORD) + Chunk.dwSize;
TRACE_(dmfile)(": %s chunk (size = %d)", debugstr_fourcc (Chunk.fccID), Chunk.dwSize);
if (!pNewItem) {
ERR(": pNewItem not yet allocated, chunk order bad?\n");
return E_OUTOFMEMORY;
}
hr = IDirectMusicUtils_IPersistStream_ParseUNFOGeneric(&Chunk, pStm, &pNewItem->desc);
if (FAILED(hr)) return hr;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment