Fix SiblingConstraint Crash: Add Size check before getting child#135
Fix SiblingConstraint Crash: Add Size check before getting child#135MrFast-js wants to merge 1 commit intoEssentialGG:masterfrom
Conversation
|
If I'm understanding correctly, this is for cases where |
|
yes @DJtheRedstoner, I have run into this crash when quickly hiding and unhiding elements, in this example its when I press the features "options" button (the gear) that can be found on lines #649-661, I can't force it to happen, and seemed to happen almost randomly when clicking on the gear, sometimes it would crash other times it would be fine, but the times it did crash it always pointed to that file having a input of -1 and it checking children[-2] thus crashing with array out of bounds . |
The new code checks if index - 1 is possible for the children array, and if its not return the value without it, this is better than before because before if the children's size changes quickly, in my case for a search bar only showing certain results, and sometimes it would crash, this fixes that crash.