Skip to content

Commit 194ac7c

Browse files
committed
Fix null dereference bug in cpp_typecheck_compound_type.cpp
1 parent c44ed8c commit 194ac7c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/cpp/cpp_typecheck_compound_type.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1271,7 +1271,7 @@ void cpp_typecheckt::typecheck_member_function(
12711271
method_qualifier);
12721272
}
12731273

1274-
if(value.id()=="cpp_not_typechecked")
1274+
if(value.id() == "cpp_not_typechecked" && value.has_operands())
12751275
move_member_initializers(initializers, type, value.op0());
12761276
else
12771277
move_member_initializers(initializers, type, value);

0 commit comments

Comments
 (0)