From e8bee64b5e9c63024921caca76bd1d45b2a574d2 Mon Sep 17 00:00:00 2001 From: Exzap <13877693+Exzap@users.noreply.github.com> Date: Wed, 6 May 2026 05:49:06 +0200 Subject: [PATCH] Latte: Fix rare corruption in buffer cache --- src/Cafe/HW/Latte/Core/LatteBufferCache.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Cafe/HW/Latte/Core/LatteBufferCache.cpp b/src/Cafe/HW/Latte/Core/LatteBufferCache.cpp index de18df33..a561a20c 100644 --- a/src/Cafe/HW/Latte/Core/LatteBufferCache.cpp +++ b/src/Cafe/HW/Latte/Core/LatteBufferCache.cpp @@ -776,9 +776,8 @@ private: { TreeNode* treeNodeParent = (treeNode->parentNodeIndex != INVALID_NODE_INDEX) ? &m_treeNodes[treeNode->parentNodeIndex] : nullptr; ReleaseTreeNode(treeNode, true); - if (treeNodeParent && treeNodeParent->usedCount > 0) - PropagateMinValue(treeNodeParent); - // note - this will never shrink the tree, since there is at least one left or right neighbor + if (treeNodeParent) + CollapseNode(treeNodeParent, depth - 1); return; } // todo - redistribute values