diff --git a/scene/2d/tile_map.cpp b/scene/2d/tile_map.cpp index 2d332135558..b60d7052763 100644 --- a/scene/2d/tile_map.cpp +++ b/scene/2d/tile_map.cpp @@ -1177,6 +1177,7 @@ void TileMap::_set_tile_data(const PoolVector &p_data) { PoolVector::Read r = p_data.read(); int offset = (format == FORMAT_2) ? 3 : 2; + ERR_FAIL_COND_MSG(c % offset != 0, "Corrupted tile data."); clear(); for (int i = 0; i < c; i += offset) { diff --git a/scene/3d/proximity_group.cpp b/scene/3d/proximity_group.cpp index 00881122a3d..7d4c547783a 100644 --- a/scene/3d/proximity_group.cpp +++ b/scene/3d/proximity_group.cpp @@ -128,6 +128,7 @@ void ProximityGroup::broadcast(String p_method, Variant p_parameters) { void ProximityGroup::_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("broadcast", p_method, p_parameters);