mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-03 17:59:46 +02:00
GP-1 Disable replace action for BadDataType
This commit is contained in:
parent
f250cfeac4
commit
3f638e22b4
1 changed files with 12 additions and 4 deletions
|
@ -67,10 +67,18 @@ public class ReplaceDataTypeAction extends DockingAction {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(node instanceof DataTypeNode)) {
|
if (!(node instanceof DataTypeNode dtNode)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return node.isModifiable();
|
if (!dtNode.isModifiable()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (dtNode.getDataType() instanceof BadDataType) {
|
||||||
|
// Although BAD datatype should not appear in tree, if it does replace is
|
||||||
|
// not supported. Delete should be used instead.
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private DataTypeTreeNode getSelectedDataTypeTreeNode(ActionContext context) {
|
private DataTypeTreeNode getSelectedDataTypeTreeNode(ActionContext context) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue