mirror of https://github.com/PCSX2/pcsx2.git
Debugger: Prevent crashing opportunities when there is an empty function list
This commit is contained in:
parent
46a0c2d5b6
commit
ebe6d3cbee
|
@ -612,6 +612,8 @@ void CpuWidget::onFuncListContextMenu(QPoint pos)
|
|||
else
|
||||
m_funclistContextMenu->clear();
|
||||
|
||||
if (m_ui.listFunctions->selectedItems().count() && m_ui.listFunctions->selectedItems().first()->data(256).isValid())
|
||||
{
|
||||
QAction* copyName = new QAction(tr("Copy Function Name"), m_ui.listFunctions);
|
||||
connect(copyName, &QAction::triggered, [this] {
|
||||
// We only store the address in the widget item
|
||||
|
@ -645,10 +647,10 @@ void CpuWidget::onFuncListContextMenu(QPoint pos)
|
|||
m_ui.memoryviewWidget->gotoAddress(m_ui.listFunctions->selectedItems().first()->data(256).toUInt());
|
||||
});
|
||||
|
||||
m_funclistContextMenu->addSeparator();
|
||||
|
||||
m_funclistContextMenu->addAction(gotoMemory);
|
||||
|
||||
m_funclistContextMenu->addSeparator();
|
||||
}
|
||||
//: "Demangling" is the opposite of "Name mangling", which is a process where a compiler takes function names and combines them with other characteristics of the function (e.g. what types of data it accepts) to ensure they stay unique even when multiple functions exist with the same name (but different inputs / const-ness). See here: https://en.wikipedia.org/wiki/Name_mangling#C++
|
||||
QAction* demangleAction = new QAction(tr("Demangle Symbols"), m_ui.listFunctions);
|
||||
demangleAction->setCheckable(true);
|
||||
|
|
Loading…
Reference in New Issue