From 7f9b6187a62612d51e6a2d92744e1634582525b2 Mon Sep 17 00:00:00 2001 From: Carter Li Date: Wed, 13 May 2026 19:28:36 +0800 Subject: [PATCH] CommandOption: fixes segfault with unknown module --- src/common/impl/commandoption.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/impl/commandoption.c b/src/common/impl/commandoption.c index d32c0fe08..e855b0ae7 100644 --- a/src/common/impl/commandoption.c +++ b/src/common/impl/commandoption.c @@ -178,7 +178,7 @@ static bool parseStructureCommand( } } - if (fn == genJsonResult) { + if (data->resultDoc) { yyjson_mut_doc* doc = data->resultDoc; yyjson_mut_val* module = yyjson_mut_arr_add_obj(doc, doc->root); yyjson_mut_obj_add_str(doc, module, "type", line);