Skip to content

Commit

Permalink
Merge pull request godotengine#28975 from RameshRavone/type_tag
Browse files Browse the repository at this point in the history
NULL global_tag for non exposed classes
  • Loading branch information
akien-mga authored May 20, 2019
2 parents 8b0ea33 + 71808b3 commit 6110bde
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion modules/gdnative/nativescript/nativescript.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1345,7 +1345,7 @@ void *NativeScriptLanguage::get_instance_binding_data(int p_idx, Object *p_objec

if (!(*binding_data)[p_idx]) {

const void *global_type_tag = global_type_tags[p_idx].get(p_object->get_class_name());
const void *global_type_tag = get_global_type_tag(p_idx, p_object->get_class_name());

// no binding data yet, soooooo alloc new one \o/
(*binding_data).write[p_idx] = binding_functions[p_idx].second.alloc_instance_binding_data(binding_functions[p_idx].second.data, global_type_tag, (godot_object *)p_object);
Expand Down Expand Up @@ -1454,6 +1454,9 @@ const void *NativeScriptLanguage::get_global_type_tag(int p_idx, StringName p_cl

const HashMap<StringName, const void *> &tags = global_type_tags[p_idx];

if (!tags.has(p_class_name))
return NULL;

const void *tag = tags.get(p_class_name);

return tag;
Expand Down

0 comments on commit 6110bde

Please sign in to comment.