diff --git a/libasn1compiler/asn1c_C.c b/libasn1compiler/asn1c_C.c index bebd4130..73ccbdde 100644 --- a/libasn1compiler/asn1c_C.c +++ b/libasn1compiler/asn1c_C.c @@ -1070,6 +1070,8 @@ asn1c_lang_C_OpenType(arg_t *arg, asn1c_ioc_table_and_objset_t *opt_ioc, struct asn1p_ioc_cell_s *cell = &opt_ioc->ioct->row[row]->column[column_index]; + if(!cell->value) continue; + asn1p_expr_t *m = asn1p_expr_clone(cell->value, 0); asn1p_expr_add(open_type_choice, m); } diff --git a/libasn1compiler/asn1c_ioc.c b/libasn1compiler/asn1c_ioc.c index 02e37a79..bb72f7de 100644 --- a/libasn1compiler/asn1c_ioc.c +++ b/libasn1compiler/asn1c_ioc.c @@ -213,7 +213,9 @@ static int emit_ioc_cell(arg_t *arg, struct asn1p_ioc_cell_s *cell) { OUT("{ \"%s\", ", cell->field->Identifier); - if(cell->value->meta_type == AMT_VALUE) { + if(!cell->value) { + /* Ignore */ + } else if(cell->value->meta_type == AMT_VALUE) { GEN_INCLUDE(asn1c_type_name(arg, cell->value, TNF_INCLUDE)); OUT("aioc__value, "); OUT("&asn_DEF_%s, ", asn1c_type_name(arg, cell->value, TNF_SAFE));