Well if that crashes sndLoopHndl will most likely be a vagabonding pointer. You should inspect the code that calls this function and especially the value for the argument sndLoopHndl.

Is there a specific reasong why you pass a pointer to the handle instead of the handle itself?


Always learn from history, to be sure you make the same mistakes again...