You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-08 12:40:44 +00:00
Fix failure in set_primary_interface when parameter is null
The program would fail if the parameter is passed as null in set_primary_interface because in the print_verbose, the get_namea) method is called on the parameter and this causes a failure if the parameter that was passed is null. Same fix was done in 3.x also and it seems to be present in master too.
This commit is contained in:
@@ -311,6 +311,7 @@ Ref<XRInterface> XRServer::get_primary_interface() const {
|
|||||||
};
|
};
|
||||||
|
|
||||||
void XRServer::set_primary_interface(const Ref<XRInterface> &p_primary_interface) {
|
void XRServer::set_primary_interface(const Ref<XRInterface> &p_primary_interface) {
|
||||||
|
ERR_FAIL_COND(p_primary_interface.is_null());
|
||||||
primary_interface = p_primary_interface;
|
primary_interface = p_primary_interface;
|
||||||
|
|
||||||
print_verbose("XR: Primary interface set to: " + primary_interface->get_name());
|
print_verbose("XR: Primary interface set to: " + primary_interface->get_name());
|
||||||
|
|||||||
Reference in New Issue
Block a user