diff options
author | Juan Linietsky <reduzio@gmail.com> | 2015-09-23 12:46:15 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2015-09-23 12:46:15 -0300 |
commit | eea52d44c797663aad85686ecb6e0b471a989e58 (patch) | |
tree | 22278e348a8b0484376e92358aebbca9a2d2e0a9 | |
parent | 52ad0b0b2a197893502e2b1beb9c10f38b6151f0 (diff) | |
parent | 5ff0b69dae55e35ef57277d32296effc9318213f (diff) |
Merge pull request #2504 from vnen/fix-collisionshape-add-bug
Check if shape is valid before referencing it
-rw-r--r-- | scene/2d/collision_shape_2d.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/scene/2d/collision_shape_2d.cpp b/scene/2d/collision_shape_2d.cpp index cd89e914fb..85751fc735 100644 --- a/scene/2d/collision_shape_2d.cpp +++ b/scene/2d/collision_shape_2d.cpp @@ -113,6 +113,10 @@ void CollisionShape2D::_notification(int p_what) { break; } + if (!shape.is_valid()) { + break; + } + rect=Rect2(); |