mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2024-11-21 16:37:20 +01:00
Ported: Hierarchical culling - Add extra check to skeleton_attach_canvas_item
Although this check shouldn't be able to fail currently, it provides a small level of extra logic checking at only small cost in DEV builds.
- lawnjelly
d7cca42ef6
This commit is contained in:
parent
e5cec36ba0
commit
33d5dcf399
@ -3807,6 +3807,14 @@ void RasterizerStorageGLES2::skeleton_attach_canvas_item(RID p_skeleton, RID p_c
|
||||
ERR_FAIL_COND(!p_canvas_item.is_valid());
|
||||
|
||||
if (p_attach) {
|
||||
#ifdef DEV_ENABLED
|
||||
// skeleton_attach_canvas_item() is not bound,
|
||||
// and checks in canvas_item_attach_skeleton() should prevent this,
|
||||
// but there isn't much harm in a DEV_ENABLED check here.
|
||||
int64_t found = skeleton->linked_canvas_items.find(p_canvas_item);
|
||||
ERR_FAIL_COND(found != -1);
|
||||
#endif
|
||||
|
||||
skeleton->linked_canvas_items.push_back(p_canvas_item);
|
||||
} else {
|
||||
int64_t found = skeleton->linked_canvas_items.find(p_canvas_item);
|
||||
|
Loading…
Reference in New Issue
Block a user