File tree 1 file changed +3
-3
lines changed 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -683,7 +683,8 @@ static bool add_nondet_string_pointer_initialization(
683
683
const struct_typet &struct_type =
684
684
to_struct_type (ns.follow (to_symbol_type (obj.type ())));
685
685
686
- if (!struct_type.has_component (" data" ) || !struct_type.has_component (" length" ))
686
+ // if no String model is loaded then we cannot construct a String object
687
+ if (struct_type.get_bool (ID_incomplete_class))
687
688
return true ;
688
689
689
690
const exprt malloc_site = allocate_dynamic_object_with_decl (
@@ -868,8 +869,7 @@ void java_object_factoryt::gen_nondet_pointer_init(
868
869
869
870
// Alternatively, if this is a void* we *must* initialise with null:
870
871
// (This can currently happen for some cases of #exception_value)
871
- bool must_be_null=
872
- subtype==empty_typet ();
872
+ bool must_be_null = subtype == empty_typet ();
873
873
874
874
if (must_be_null)
875
875
{
You can’t perform that action at this time.
0 commit comments