summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2020-08-16 22:06:29 +0200
committerGitHub <noreply@github.com>2020-08-16 22:06:29 +0200
commit75e2a405d008d6ee6455079ba37b6a6202c5f932 (patch)
tree697a2313e344bf294fc1a67851e2fb0e71d39dd5 /modules
parent87ae509905e6a4388588472b4edddb791aec56a4 (diff)
parent6f426c3360595593294d910471f3c30407bbd38f (diff)
Merge pull request #40980 from Xrayez/port-classdb-tests
Port ClassDB tests to use doctest
Diffstat (limited to 'modules')
-rw-r--r--modules/mobile_vr/register_types.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/modules/mobile_vr/register_types.cpp b/modules/mobile_vr/register_types.cpp
index 75638d47c4..0bb555e780 100644
--- a/modules/mobile_vr/register_types.cpp
+++ b/modules/mobile_vr/register_types.cpp
@@ -35,9 +35,11 @@
void register_mobile_vr_types() {
ClassDB::register_class<MobileVRInterface>();
- Ref<MobileVRInterface> mobile_vr;
- mobile_vr.instance();
- XRServer::get_singleton()->add_interface(mobile_vr);
+ if (XRServer::get_singleton()) {
+ Ref<MobileVRInterface> mobile_vr;
+ mobile_vr.instance();
+ XRServer::get_singleton()->add_interface(mobile_vr);
+ }
}
void unregister_mobile_vr_types() {