Add check to internal methods to prevent crash
(cherry picked from commit 448295cd51
)
This commit is contained in:
parent
10d07e02f2
commit
4641e6b170
@ -1217,6 +1217,7 @@ void TileMap::_set_tile_data(const PoolVector<int> &p_data) {
|
|||||||
PoolVector<int>::Read r = p_data.read();
|
PoolVector<int>::Read r = p_data.read();
|
||||||
|
|
||||||
int offset = (format == FORMAT_2) ? 3 : 2;
|
int offset = (format == FORMAT_2) ? 3 : 2;
|
||||||
|
ERR_FAIL_COND_MSG(c % offset != 0, "Corrupted tile data.");
|
||||||
|
|
||||||
clear();
|
clear();
|
||||||
for (int i = 0; i < c; i += offset) {
|
for (int i = 0; i < c; i += offset) {
|
||||||
|
@ -140,7 +140,7 @@ void ProximityGroup::broadcast(String p_method, Variant p_parameters) {
|
|||||||
void ProximityGroup::_proximity_group_broadcast(String p_method, Variant p_parameters) {
|
void ProximityGroup::_proximity_group_broadcast(String p_method, Variant p_parameters) {
|
||||||
|
|
||||||
if (dispatch_mode == MODE_PROXY) {
|
if (dispatch_mode == MODE_PROXY) {
|
||||||
|
ERR_FAIL_COND(!is_inside_tree());
|
||||||
get_parent()->call(p_method, p_parameters);
|
get_parent()->call(p_method, p_parameters);
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user