mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-21 20:15:17 +00:00
HackStudio: Pass the correct VariableInfo
address to create_index
Previously, we tried to store `VariableInfo` to `ModelIndex` internal data, but accidently stored address of wrapper class `NonnullOwnPtr`. When we retrieved it later in `VariablesModel::data()` it made program to crash. This allows us to run debug normally after setting any break point in `HackStudio`.
This commit is contained in:
parent
7e6722abe8
commit
0391096286
Notes:
sideshowbarker
2024-07-16 23:23:26 +09:00
Author: https://github.com/hanaa12G Commit: https://github.com/SerenityOS/serenity/commit/0391096286 Pull-request: https://github.com/SerenityOS/serenity/pull/21671 Issue: https://github.com/SerenityOS/serenity/issues/21642
1 changed files with 1 additions and 1 deletions
|
@ -15,7 +15,7 @@ GUI::ModelIndex VariablesModel::index(int row, int column, const GUI::ModelIndex
|
|||
if (!parent_index.is_valid()) {
|
||||
if (static_cast<size_t>(row) >= m_variables.size())
|
||||
return {};
|
||||
return create_index(row, column, &m_variables[row]);
|
||||
return create_index(row, column, m_variables[row].ptr());
|
||||
}
|
||||
auto* parent = static_cast<Debug::DebugInfo::VariableInfo const*>(parent_index.internal_data());
|
||||
if (static_cast<size_t>(row) >= parent->members.size())
|
||||
|
|
Loading…
Add table
Reference in a new issue