summaryrefslogtreecommitdiff
path: root/audio/csound4/patches/patch-af
blob: 9ae33e79196e8a46be05d7404c363408ccf9649e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
$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);
       }