From f892d94ff74b6469f2a9ad241eec9791f029dc8f Mon Sep 17 00:00:00 2001
From: JanThorbecke <janth@xs4all.nl>
Date: Tue, 23 Apr 2019 14:00:37 +0200
Subject: [PATCH]  asserts for output

---
 MDD/mdd.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/MDD/mdd.c b/MDD/mdd.c
index ec2bd06..cf19175 100644
--- a/MDD/mdd.c
+++ b/MDD/mdd.c
@@ -371,6 +371,7 @@ int main (int argc, char **argv)
 		strcpy(filename, file_out);
 		if (verbose>2) fprintf(stderr,"writing all output shot into file %s\n", filename);
 		fpout = fopen( filename, "w+" );
+ 	    assert(fpout != NULL);
 	}
 //#pragma omp for
 	for (jstation=0; jstation<nstationB; jstation++) {
@@ -434,6 +435,7 @@ int main (int argc, char **argv)
 				name_ext(filename, number);
 				if (verbose>3) fprintf(stderr,"writing to file %s\n", filename);
 				fpout = fopen( filename, "w+" );
+ 	            assert(fpout != NULL);
 			}
 			for (istation=0; istation<nstationA; istation++) {
 				hdr[0].tracl = istation+1;
-- 
GitLab