Validates texture in set_piece_texture
This commit is contained in:
parent
435cced7d8
commit
5586103a94
@ -1333,6 +1333,7 @@ void LargeTexture::set_piece_offset(int p_idx, const Point2 &p_offset) {
|
|||||||
void LargeTexture::set_piece_texture(int p_idx, const Ref<Texture> &p_texture) {
|
void LargeTexture::set_piece_texture(int p_idx, const Ref<Texture> &p_texture) {
|
||||||
|
|
||||||
ERR_FAIL_COND(p_texture == this);
|
ERR_FAIL_COND(p_texture == this);
|
||||||
|
ERR_FAIL_COND(p_texture.is_null());
|
||||||
ERR_FAIL_INDEX(p_idx, pieces.size());
|
ERR_FAIL_INDEX(p_idx, pieces.size());
|
||||||
pieces.write[p_idx].texture = p_texture;
|
pieces.write[p_idx].texture = p_texture;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user