mirror of
https://github.com/nicbarker/clay.git
synced 2025-01-23 09:56:03 +00:00
Fix possible NULL pointer dereference (#153)
Some checks failed
CMake on multiple platforms / build (Release, cl, cl, windows-latest) (push) Waiting to run
CMake on multiple platforms / build (Release, clang, clang++, ubuntu-latest) (push) Failing after 11s
CMake on multiple platforms / build (Release, gcc, g++, ubuntu-latest) (push) Failing after 11s
Some checks failed
CMake on multiple platforms / build (Release, cl, cl, windows-latest) (push) Waiting to run
CMake on multiple platforms / build (Release, clang, clang++, ubuntu-latest) (push) Failing after 11s
CMake on multiple platforms / build (Release, gcc, g++, ubuntu-latest) (push) Failing after 11s
This commit is contained in:
parent
cf12cd6af8
commit
bcb555fd10
3
clay.h
3
clay.h
@ -1842,12 +1842,13 @@ void Clay__ElementPostConfiguration(void) {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Clay_LayoutElementHashMapItem *parentItem = Clay__GetHashMapItem(floatingConfig->parentId);
|
Clay_LayoutElementHashMapItem *parentItem = Clay__GetHashMapItem(floatingConfig->parentId);
|
||||||
clipElementId = Clay__int32_tArray_Get(&Clay__layoutElementClipElementIds, (int32_t)(parentItem->layoutElement - Clay__layoutElements.internalArray));
|
|
||||||
if (!parentItem) {
|
if (!parentItem) {
|
||||||
Clay__errorHandler.errorHandlerFunction(CLAY__INIT(Clay_ErrorData) {
|
Clay__errorHandler.errorHandlerFunction(CLAY__INIT(Clay_ErrorData) {
|
||||||
.errorType = CLAY_ERROR_TYPE_FLOATING_CONTAINER_PARENT_NOT_FOUND,
|
.errorType = CLAY_ERROR_TYPE_FLOATING_CONTAINER_PARENT_NOT_FOUND,
|
||||||
.errorText = CLAY_STRING("A floating element was declared with a parentId, but no element with that ID was found."),
|
.errorText = CLAY_STRING("A floating element was declared with a parentId, but no element with that ID was found."),
|
||||||
.userData = Clay__errorHandler.userData });
|
.userData = Clay__errorHandler.userData });
|
||||||
|
} else {
|
||||||
|
clipElementId = Clay__int32_tArray_Get(&Clay__layoutElementClipElementIds, parentItem->layoutElement - Clay__layoutElements.internalArray);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Clay__LayoutElementTreeRootArray_Add(&Clay__layoutElementTreeRoots, CLAY__INIT(Clay__LayoutElementTreeRoot) {
|
Clay__LayoutElementTreeRootArray_Add(&Clay__layoutElementTreeRoots, CLAY__INIT(Clay__LayoutElementTreeRoot) {
|
||||||
|
Loading…
Reference in New Issue
Block a user