mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-06-01 11:48:42 +08:00
Fixes for Symbol Tree exceptions
This commit is contained in:
+10
-2
@@ -68,13 +68,18 @@ public abstract class SymbolCategoryNode extends SymbolTreeNode {
|
|||||||
@Override
|
@Override
|
||||||
public List<GTreeNode> generateChildren(TaskMonitor monitor) throws CancelledException {
|
public List<GTreeNode> generateChildren(TaskMonitor monitor) throws CancelledException {
|
||||||
if (!isEnabled) {
|
if (!isEnabled) {
|
||||||
return Collections.emptyList();
|
return List.of();
|
||||||
|
}
|
||||||
|
|
||||||
|
SymbolTreeRootNode root = (SymbolTreeRootNode) getRoot();
|
||||||
|
if (root == null) {
|
||||||
|
// this can happen if the tree is reloaded while we are searching in a background task
|
||||||
|
return List.of();
|
||||||
}
|
}
|
||||||
|
|
||||||
SymbolType symbolType = symbolCategory.getSymbolType();
|
SymbolType symbolType = symbolCategory.getSymbolType();
|
||||||
List<GTreeNode> list = getSymbols(symbolType, monitor);
|
List<GTreeNode> list = getSymbols(symbolType, monitor);
|
||||||
monitor.checkCancelled();
|
monitor.checkCancelled();
|
||||||
SymbolTreeRootNode root = (SymbolTreeRootNode) getRoot();
|
|
||||||
int groupThreshold = root.getNodeGroupThreshold();
|
int groupThreshold = root.getNodeGroupThreshold();
|
||||||
return OrganizationNode.organize(list, groupThreshold, monitor);
|
return OrganizationNode.organize(list, groupThreshold, monitor);
|
||||||
}
|
}
|
||||||
@@ -322,6 +327,9 @@ public abstract class SymbolCategoryNode extends SymbolTreeNode {
|
|||||||
if (this == o) {
|
if (this == o) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
if (o == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
if (getClass() != o.getClass()) {
|
if (getClass() != o.getClass()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user