File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -2166,6 +2166,12 @@ def generate_utility_functions(api, output_dir):
21662166 header .append ("public:" )
21672167
21682168 for function in api ["utility_functions" ]:
2169+ if function ["name" ] == "is_instance_valid" :
2170+ # The `is_instance_valid()` function doesn't work as developers expect, and unless used very
2171+ # carefully will cause crashes. Instead, developers should use `ObjectDB::get_instance()`
2172+ # with object ids to ensure that an instance is still valid.
2173+ continue
2174+
21692175 vararg = "is_vararg" in function and function ["is_vararg" ]
21702176
21712177 function_signature = "\t "
@@ -2200,6 +2206,9 @@ def generate_utility_functions(api, output_dir):
22002206 source .append ("" )
22012207
22022208 for function in api ["utility_functions" ]:
2209+ if function ["name" ] == "is_instance_valid" :
2210+ continue
2211+
22032212 vararg = "is_vararg" in function and function ["is_vararg" ]
22042213
22052214 function_signature = make_signature ("UtilityFunctions" , function )
You can’t perform that action at this time.
0 commit comments