diff --git a/src/menus/DisassemblyContextMenu.cpp b/src/menus/DisassemblyContextMenu.cpp index 08ed16de..257c2eba 100644 --- a/src/menus/DisassemblyContextMenu.cpp +++ b/src/menus/DisassemblyContextMenu.cpp @@ -459,6 +459,10 @@ void DisassemblyContextMenu::aboutToShowSlot() actionAnalyzeFunction.setVisible(true); + // Show the option to remove a defined string only if a string is defined in this address + QString stringDefinition = Core()->cmd("Cs. @ " + RAddressString(offset)); + actionSetAsStringRemove.setVisible(!stringDefinition.isEmpty()); + QString comment = Core()->cmd("CC." + RAddressString(offset)); if (comment.isNull() || comment.isEmpty()) { actionDeleteComment.setVisible(false);