overlays/tabs: Fix crash when scrolling through tabs quickly

This commit is contained in:
kd-11 2026-03-16 01:57:40 +03:00 committed by kd-11
parent 6c0c80b7bb
commit 25581ce52f
2 changed files with 6 additions and 0 deletions

View file

@ -82,6 +82,8 @@ namespace rsx::overlays
void tabbed_container::reflow_layout()
{
std::lock_guard lock(m_mutex);
if (m_headers_width > w)
{
// Invalid config
@ -140,6 +142,8 @@ namespace rsx::overlays
compiled_resource& tabbed_container::get_compiled()
{
std::lock_guard lock(m_mutex);
// NOTE: Caching is difficult as the subviews are themselves dynamic.
// Doable but not worth the effort
compiled_resources.clear();

View file

@ -49,6 +49,8 @@ namespace rsx::overlays
u16 m_headers_width = 0;
u32 m_selected_idx = umax;
bool m_is_in_tab_selection_mode = true;
std::mutex m_mutex;
};
}