mirror of
https://github.com/nicbarker/clay.git
synced 2026-07-27 05:18:39 +00:00
[Core] Fix a crash when removing a transition handler mid transition
This commit is contained in:
parent
4c2c778861
commit
fdfc9150dd
1 changed files with 3 additions and 2 deletions
5
clay.h
5
clay.h
|
|
@ -4507,8 +4507,9 @@ Clay_RenderCommandArray Clay_EndLayout(float deltaTime) {
|
|||
continue;
|
||||
}
|
||||
}
|
||||
// Transition element exited and doesn't have an exit handler defined, delete the transition data
|
||||
} else if (hashMapItem->generation <= context->generation) {
|
||||
// Transition element exited and doesn't have an exit handler defined
|
||||
// Or, the user deleted the transition handler from one frame to the next
|
||||
} else if (hashMapItem->generation <= context->generation || !hashMapItem->layoutElement->config.transition.handler) {
|
||||
Clay__TransitionDataInternalArray_RemoveSwapback(&context->transitionDatas, i);
|
||||
i--;
|
||||
continue;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue