Skip to content

Commit

Permalink
Debugger: Fix crash in symbol tree menu code
Browse files Browse the repository at this point in the history
  • Loading branch information
chaoticgd authored and F0bes committed Oct 8, 2024
1 parent 62f20a4 commit 60abebb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pcsx2-qt/Debugger/CpuWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,11 @@ void CpuWidget::setupSymbolTrees()
m_local_variable_tree = new LocalVariableTreeWidget(m_cpu);
m_parameter_variable_tree = new ParameterVariableTreeWidget(m_cpu);

m_function_tree->updateModel();
m_global_variable_tree->updateModel();
m_local_variable_tree->updateModel();
m_parameter_variable_tree->updateModel();

m_ui.tabFunctions->layout()->addWidget(m_function_tree);
m_ui.tabGlobalVariables->layout()->addWidget(m_global_variable_tree);
m_ui.tabLocalVariables->layout()->addWidget(m_local_variable_tree);
Expand Down
2 changes: 2 additions & 0 deletions pcsx2-qt/Debugger/SymbolTree/SymbolTreeWidgets.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,8 @@ void SymbolTreeWidget::setupMenu()
void SymbolTreeWidget::openMenu(QPoint pos)
{
SymbolTreeNode* node = currentNode();
if (!node)
return;

bool node_is_object = node->tag == SymbolTreeNode::OBJECT;
bool node_is_symbol = node->symbol.valid();
Expand Down

0 comments on commit 60abebb

Please sign in to comment.