Skip to content

Commit 7f9b618

Browse files
committed
CommandOption: fixes segfault with unknown module
1 parent 8067e43 commit 7f9b618

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/common/impl/commandoption.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ static bool parseStructureCommand(
178178
}
179179
}
180180

181-
if (fn == genJsonResult) {
181+
if (data->resultDoc) {
182182
yyjson_mut_doc* doc = data->resultDoc;
183183
yyjson_mut_val* module = yyjson_mut_arr_add_obj(doc, doc->root);
184184
yyjson_mut_obj_add_str(doc, module, "type", line);

0 commit comments

Comments
 (0)