Debugger: Fix AST node ownership confusion bug

This commit is contained in:
chaoticgd 2025-01-05 22:10:07 +00:00 committed by lightningterror
parent 4f7c8a77f6
commit 0e7da0f1a8
1 changed files with 2 additions and 2 deletions

View File

@ -460,8 +460,8 @@ std::vector<std::unique_ptr<SymbolTreeNode>> SymbolTreeModel::populateChildren(
for (const ccc::ast::StructOrUnion::FlatField& field : fields) for (const ccc::ast::StructOrUnion::FlatField& field : fields)
{ {
if (symbol) if (field.symbol)
parent_handle = ccc::NodeHandle(*symbol, nullptr); parent_handle = ccc::NodeHandle(*field.symbol, nullptr);
SymbolTreeLocation field_location = location.addOffset(field.base_offset + field.node->offset_bytes); SymbolTreeLocation field_location = location.addOffset(field.base_offset + field.node->offset_bytes);
if (field_location.type == SymbolTreeLocation::NONE) if (field_location.type == SymbolTreeLocation::NONE)