Don't look at NULL strings (summary_name)
[fw/altos] / ao-tools / ao-postflight / ao-postflight.c
index 0c632c343ca0e576c2c247e6405992c16b712cbc..c1e4d800cd1edcf106b3010aca9d28d324430006 100644 (file)
@@ -230,7 +230,7 @@ main (int argc, char **argv)
                }
        }
        if (detail_name) {
                }
        }
        if (detail_name) {
-               if (!strcmp (summary_name, detail_name))
+               if (summary_name && !strcmp (summary_name, detail_name))
                        detail_file = summary_file;
                else {
                        detail_file = fopen(detail_name, "w");
                        detail_file = summary_file;
                else {
                        detail_file = fopen(detail_name, "w");