From fcbfa6b01c0222b01254730c66d539ed2c841a4e Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Thu, 26 Dec 2002 06:55:45 +0000 Subject: [PATCH] (getargs) [MSDOS]: Don't assume optarg != NULL with -g option. --- src/getargs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/getargs.c b/src/getargs.c index 23b06394..ffdff8ab 100644 --- a/src/getargs.c +++ b/src/getargs.c @@ -355,7 +355,8 @@ getargs (int argc, char *argv[]) case 'g': /* Here, the -g and --graph=FILE options are differentiated. */ graph_flag = 1; - spec_graph_file = AS_FILE_NAME (optarg); + if (optarg) + spec_graph_file = AS_FILE_NAME (optarg); break; case 'v': -- 2.47.2