Fixed #98 Rename in a non-function (#104)

This commit is contained in:
Properrr 2017-11-08 01:02:39 -08:00 committed by xarkes
parent adef80e9e8
commit 377efa7050

View File

@ -132,6 +132,11 @@ void DisassemblyContextMenu::on_actionRename_triggered()
{ {
// Get function for clicked offset // Get function for clicked offset
RAnalFunction *fcn = CutterCore::getInstance()->functionAt(offset); RAnalFunction *fcn = CutterCore::getInstance()->functionAt(offset);
if( nullptr == fcn )
{
return;
}
RenameDialog *dialog = new RenameDialog(this); RenameDialog *dialog = new RenameDialog(this);
// Get function based on click position // Get function based on click position
dialog->setFunctionName(fcn->name); dialog->setFunctionName(fcn->name);