$OpenBSD: patch-libmpcodecs_ad_pcm_c,v 1.3 2006/07/19 21:40:47 robert Exp $ --- libmpcodecs/ad_pcm.c.orig Sun Jun 11 20:35:41 2006 +++ libmpcodecs/ad_pcm.c Thu Jul 6 00:08:11 2006 @@ -20,6 +20,8 @@ LIBAD_EXTERN(pcm) static int init(sh_audio_t *sh_audio) { WAVEFORMATEX *h=sh_audio->wf; + if (!h) + return 0; sh_audio->i_bps=h->nAvgBytesPerSec; sh_audio->channels=h->nChannels; sh_audio->samplerate=h->nSamplesPerSec;