fix: Use after free when checking for frame render condition

This commit is contained in:
WerWolv
2025-07-30 22:33:59 +02:00
parent 5c99974202
commit ac98e4e0b5

View File

@@ -849,9 +849,8 @@ namespace hex {
auto drawData = viewPort->DrawData;
for (int n = 0; n < drawData->CmdListsCount; n++) {
const ImDrawList *cmdList = drawData->CmdLists[n];
std::string ownerName = cmdList->_OwnerName;
if (vtxDataSize == previousVtxDataSize && (!ownerName.contains("##Popup") || !ownerName.contains("##image"))) {
if (vtxDataSize == previousVtxDataSize) {
shouldRender = shouldRender || std::memcmp(previousVtxData.data() + offset, cmdList->VtxBuffer.Data, cmdList->VtxBuffer.size() * sizeof(ImDrawVert)) != 0;
} else {
shouldRender = true;