mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 13:38:11 +00:00
Profiler: Fix use after free in FlameGraphView
Layout cleared the list of bars in the flame graph, but didn't clear the reference m_hovered_bar. This could cause a crash in mousedown_event() when clicking twice: the first click caused layout, the second used the old reference.
This commit is contained in:
parent
f52e468cd6
commit
c2a1817c70
1 changed files with 1 additions and 0 deletions
|
@ -165,6 +165,7 @@ String FlameGraphView::bar_label(StackBar const& bar) const
|
|||
void FlameGraphView::layout_bars()
|
||||
{
|
||||
m_bars.clear();
|
||||
m_hovered_bar = nullptr;
|
||||
|
||||
// Explicit copy here so the layout can mutate
|
||||
Vector<GUI::ModelIndex> selected = m_selected_indexes;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue