summaryrefslogtreecommitdiffstats
path: root/tests/test_main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_main.cpp')
-rw-r--r--tests/test_main.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/test_main.cpp b/tests/test_main.cpp
index 949e4f0b33..3c184ccc5d 100644
--- a/tests/test_main.cpp
+++ b/tests/test_main.cpp
@@ -176,6 +176,7 @@
#include "servers/physics_server_2d.h"
#ifndef _3D_DISABLED
#include "servers/physics_server_3d.h"
+#include "servers/physics_server_3d_dummy.h"
#endif // _3D_DISABLED
#include "servers/rendering/rendering_server_default.h"
@@ -290,6 +291,9 @@ struct GodotTestCaseListener : public doctest::IReporter {
#ifndef _3D_DISABLED
physics_server_3d = PhysicsServer3DManager::get_singleton()->new_default_server();
+ if (!physics_server_3d) {
+ physics_server_3d = memnew(PhysicsServer3DDummy);
+ }
physics_server_3d->init();
#endif // _3D_DISABLED