summaryrefslogtreecommitdiff
path: root/servers/physics_3d/broad_phase_3d_basic.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'servers/physics_3d/broad_phase_3d_basic.cpp')
-rw-r--r--servers/physics_3d/broad_phase_3d_basic.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/servers/physics_3d/broad_phase_3d_basic.cpp b/servers/physics_3d/broad_phase_3d_basic.cpp
index 0f271b33af..f5ea1897a9 100644
--- a/servers/physics_3d/broad_phase_3d_basic.cpp
+++ b/servers/physics_3d/broad_phase_3d_basic.cpp
@@ -190,8 +190,10 @@ void BroadPhase3DBasic::update() {
void *data = nullptr;
if (pair_callback) {
data = pair_callback(elem_A->owner, elem_A->subindex, elem_B->owner, elem_B->subindex, unpair_userdata);
+ if (data) {
+ pair_map.insert(key, data);
+ }
}
- pair_map.insert(key, data);
}
}
}