Merge pull request #29299 from creikey/master

Check if parent is null before updating transform
This commit is contained in:
Rémi Verschelde 2019-05-31 09:51:05 +02:00 committed by GitHub
commit 77880d1b4d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -228,7 +228,9 @@ void CollisionShape::_update_debug_shape() {
void CollisionShape::_shape_changed() {
// If this is a heightfield shape our center may have changed
_update_in_shape_owner(true);
if (parent) {
_update_in_shape_owner(true);
}
if (is_inside_tree() && get_tree()->is_debugging_collisions_hint() && !debug_shape_dirty) {
debug_shape_dirty = true;