diff options
author | Haoyu Qiu <timothyqiu32@gmail.com> | 2021-07-27 12:26:13 +0800 |
---|---|---|
committer | Haoyu Qiu <timothyqiu32@gmail.com> | 2021-07-27 12:26:13 +0800 |
commit | 448295cd5183dc8cc168651aa69f5569538dce54 (patch) | |
tree | 5ced2f2ca54da3bee687732de16f8ee6d50b61eb /scene/3d | |
parent | e6a544c169ae598c1a6f8632f6d8bed1abcdaddc (diff) |
Add check to internal methods to prevent crash
Diffstat (limited to 'scene/3d')
-rw-r--r-- | scene/3d/proximity_group_3d.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/scene/3d/proximity_group_3d.cpp b/scene/3d/proximity_group_3d.cpp index 037110eaa1..c8c61a9f00 100644 --- a/scene/3d/proximity_group_3d.cpp +++ b/scene/3d/proximity_group_3d.cpp @@ -128,6 +128,7 @@ void ProximityGroup3D::broadcast(String p_method, Variant p_parameters) { void ProximityGroup3D::_proximity_group_broadcast(String p_method, Variant p_parameters) { if (dispatch_mode == MODE_PROXY) { + ERR_FAIL_COND(!is_inside_tree()); get_parent()->call(p_method, p_parameters); } else { emit_signal(SNAME("broadcast"), p_method, p_parameters); |