]> git.sur5r.net Git - cc65/blobdiff - src/sp65/main.c
The program dumped core when read/write was used without a conversion of the
[cc65] / src / sp65 / main.c
index a776bf9fbb8f84d88f19ca0df10baf755f40c870..3faf1f387d83bf079f9e8b02bd49fd62fcb61028 100644 (file)
@@ -302,6 +302,11 @@ static void OptWrite (const char* Opt attribute ((unused)), const char* Arg)
     /* Parse the argument */
     Collection* A = ParseAttrList (Arg, NameList, 2);
 
+    /* We must have output data */
+    if (D == 0) {
+        Error ("No conversion, so there's nothing to write");
+    }
+
     /* Write the file */
     WriteOutputFile (D, A, C);