$NetBSD: patch-af,v 1.1 2005/11/09 06:35:25 ben Exp $ --- csound/soundin.c.orig 2005-04-10 02:43:07.000000000 -0700 +++ csound/soundin.c @@ -204,7 +204,7 @@ int sndgetset(SOUNDIN *p) /* core strsets[filno]) strcpy(soundiname, strsets[filno]); else sprintf(soundiname,"soundin.%ld",filno); /* soundin.filno */ - if ((int) *p->skipinit != 0) { + if (p->skipinit != NULL && (int) *p->skipinit != 0) { if (strcmp(p->sfname,soundiname)) { printf("error: cannot tie to a new soundfile\n"); return -1; @@ -909,7 +909,7 @@ void sndinset(SOUNDIN *p) /* init rou if (p->fdch.fd) { /* if file already open, close it */ /* RWD: it is not safe to assume all compilers init this to 0 */ /* (IV: but it is allocated with mcalloc...) */ - if ((int) *p->skipinit == 0) { + if (p->skipinit != NULL && (int) *p->skipinit == 0) { /* reload the file */ reinit++; close(p->fdch.fd); }