pspp-convert: Fix crash when the output file cannot be created.
[pspp] / utilities / pspp-convert.c
index cd760199d3813340626727db584c85e13bca992c..f21e5bdb8b907cb51a25a331d9311f436fc743e5 100644 (file)
@@ -203,6 +203,8 @@ main (int argc, char *argv[])
              output_filename);
       NOT_REACHED ();
     }
+  if (!writer)
+    error (1, 0, _("%s: error opening output file"), output_filename);
 
   for (i = 0; i < max_cases; i++)
     {