Closed SogoCZE closed 1 month ago
In some situations mapItem in Clay_SetPointerState can end up being null which results in to crash (because elementId is being accessed on null mapItem).
mapItem
Clay_SetPointerState
elementId
An example of this behaviour can be seen when you have an empty layout with only one text:
Clay_BeginLayout(); CLAY_TEXT( CLAY_ID("HelloWorldText"), CLAY_STRING("Hello World!"), CLAY_TEXT_CONFIG( .fontId = FONT_ID_BODY_24, .fontSize = 24, .textColor = {255, 0, 0, 255} ) ); return Clay_EndLayout();
Hello, thanks for reporting this one! Taking a look now 👀
Seems like the entire second half of that if statement was just an incorrect case. Must have been left over from a refactor or something. Nice catch!
In some situations
mapItem
inClay_SetPointerState
can end up being null which results in to crash (becauseelementId
is being accessed on nullmapItem
).An example of this behaviour can be seen when you have an empty layout with only one text: