From 5e1fd62ae4e72fb1d693fd887d5fda9b5da6f95c Mon Sep 17 00:00:00 2001 From: Sebastian Ullrich Date: Tue, 10 Dec 2019 16:37:18 +0100 Subject: [PATCH] fix: --make without argument should not segfault --- src/shell/lean.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/shell/lean.cpp b/src/shell/lean.cpp index bcc3d9bee0..f2127f37ee 100644 --- a/src/shell/lean.cpp +++ b/src/shell/lean.cpp @@ -466,7 +466,9 @@ int main(int argc, char ** argv) { break; case 'm': make_mode = true; - olean_fn = optarg; + if (optarg) { + olean_fn = optarg; + } break; case 'M': opts = opts.update(get_max_memory_opt_name(), static_cast(atoi(optarg)));