Merge pull request #1447 from dsnopek/avoid-double-postinitialize

Fix NOTIFICATION_POSTINITIALIZE sent twice to native parent classes
This commit is contained in:
David Snopek
2024-05-17 11:56:09 -05:00
committed by GitHub
2 changed files with 7 additions and 4 deletions

View File

@@ -51,10 +51,7 @@ void Wrapped::_postinitialize() {
}
godot::internal::gdextension_interface_object_set_instance_binding(_owner, godot::internal::token, this, _get_bindings_callbacks());
if (extension_class) {
Object *obj = dynamic_cast<Object *>(this);
if (obj) {
obj->notification(Object::NOTIFICATION_POSTINITIALIZE);
}
_notificationv(Object::NOTIFICATION_POSTINITIALIZE);
}
}