mirror of
https://github.com/godotengine/godot
synced 2024-11-02 14:03:02 +00:00
Merge pull request #29299 from creikey/master
Check if parent is null before updating transform
This commit is contained in:
commit
77880d1b4d
1 changed files with 3 additions and 1 deletions
|
@ -228,7 +228,9 @@ void CollisionShape::_update_debug_shape() {
|
||||||
|
|
||||||
void CollisionShape::_shape_changed() {
|
void CollisionShape::_shape_changed() {
|
||||||
// If this is a heightfield shape our center may have changed
|
// If this is a heightfield shape our center may have changed
|
||||||
|
if (parent) {
|
||||||
_update_in_shape_owner(true);
|
_update_in_shape_owner(true);
|
||||||
|
}
|
||||||
|
|
||||||
if (is_inside_tree() && get_tree()->is_debugging_collisions_hint() && !debug_shape_dirty) {
|
if (is_inside_tree() && get_tree()->is_debugging_collisions_hint() && !debug_shape_dirty) {
|
||||||
debug_shape_dirty = true;
|
debug_shape_dirty = true;
|
||||||
|
|
Loading…
Reference in a new issue