diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2016-10-09 14:53:32 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-09 14:53:32 +0200 |
commit | b9e010fb7fa337f0aeb4a8262f61664300593847 (patch) | |
tree | 0446fcae0e4487699eaf10f5841f43bc4de7235c /scene/main | |
parent | 20773733ca59d4860caa61b2bab5f469a2f5b7aa (diff) | |
parent | 8671836b76e8723a1d9021f8d7bf56ce5fdcc6f3 (diff) |
Merge pull request #6743 from mateka/issue-6296
Issue #6296: When searching for control, checking if matrix is inversible
Diffstat (limited to 'scene/main')
-rw-r--r-- | scene/main/viewport.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp index b22d1fcdf4..0c243bd473 100644 --- a/scene/main/viewport.cpp +++ b/scene/main/viewport.cpp @@ -1715,6 +1715,9 @@ Control* Viewport::_gui_find_control_at_pos(CanvasItem* p_node,const Point2& p_g } Matrix32 matrix = p_xform * p_node->get_transform(); + // matrix.basis_determinant() == 0.0f implies that node does not exist on scene + if(matrix.basis_determinant() == 0.0f) + return NULL; if (!c || !c->clips_input() || c->has_point(matrix.affine_inverse().xform(p_global))) { |