Commit 182338ba authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

dmusic: Avoid crashing in traces if wave doesn't have a WSMPL.

parent 2a1fd985
...@@ -199,14 +199,17 @@ HRESULT wave_create_from_chunk(IStream *stream, struct chunk_entry *parent, IUnk ...@@ -199,14 +199,17 @@ HRESULT wave_create_from_chunk(IStream *stream, struct chunk_entry *parent, IUnk
TRACE(" - wBitsPerSample: %u\n", This->format->wBitsPerSample); TRACE(" - wBitsPerSample: %u\n", This->format->wBitsPerSample);
TRACE(" - cbSize: %u\n", This->format->cbSize); TRACE(" - cbSize: %u\n", This->format->cbSize);
} }
TRACE(" - sample: {size: %lu, unity_note: %u, fine_tune: %d, attenuation: %ld, options: %#lx, loops: %lu}\n", if (This->sample)
This->sample->head.cbSize, This->sample->head.usUnityNote, {
This->sample->head.sFineTune, This->sample->head.lAttenuation, TRACE(" - sample: {size: %lu, unity_note: %u, fine_tune: %d, attenuation: %ld, options: %#lx, loops: %lu}\n",
This->sample->head.fulOptions, This->sample->head.cSampleLoops); This->sample->head.cbSize, This->sample->head.usUnityNote,
for (i = 0; i < This->sample->head.cSampleLoops; i++) This->sample->head.sFineTune, This->sample->head.lAttenuation,
TRACE(" - loops[%u]: {size: %lu, type: %lu, start: %lu, length: %lu}\n", i, This->sample->head.fulOptions, This->sample->head.cSampleLoops);
This->sample->loops[i].cbSize, This->sample->loops[i].ulType, for (i = 0; i < This->sample->head.cSampleLoops; i++)
This->sample->loops[i].ulStart, This->sample->loops[i].ulLength); TRACE(" - loops[%u]: {size: %lu, type: %lu, start: %lu, length: %lu}\n", i,
This->sample->loops[i].cbSize, This->sample->loops[i].ulType,
This->sample->loops[i].ulStart, This->sample->loops[i].ulLength);
}
} }
*ret_iface = iface; *ret_iface = iface;
......
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