Merge pull request #39504 from madmiraal/fix-39500-3.2

[3.2] Ensure pair callback data is set to null when it's null.
This commit is contained in:
Rémi Verschelde 2020-06-13 16:33:06 +02:00 committed by GitHub
commit 879014c3ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 4 deletions

View File

@ -83,10 +83,7 @@ void BroadPhase2DHashGrid::_check_motion(Element *p_elem) {
if (pairing) { if (pairing) {
if (pair_callback) { if (pair_callback) {
void *ud = pair_callback(p_elem->owner, p_elem->subindex, E->key()->owner, E->key()->subindex, pair_userdata); E->get()->ud = pair_callback(p_elem->owner, p_elem->subindex, E->key()->owner, E->key()->subindex, pair_userdata);
if (ud) {
E->get()->ud = ud;
}
} }
} else { } else {