diff --git a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/module/TreeManager.java b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/module/TreeManager.java index 14c429d914..4aeb71cd48 100644 --- a/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/module/TreeManager.java +++ b/Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/module/TreeManager.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -195,6 +195,10 @@ public class TreeManager implements ManagerDB { */ public String[] getTreeNames() { String[] names = new String[treeMap.size()]; + if (names.length == 0) { + return names; + } + try { RecordIterator iter = treeAdapter.getRecords(); diff --git a/Ghidra/Framework/SoftwareModeling/src/test/java/ghidra/program/model/symbol/StubSymbol.java b/Ghidra/Framework/SoftwareModeling/src/test/java/ghidra/program/model/symbol/StubSymbol.java index 2d4cd2c866..708a9350ea 100644 --- a/Ghidra/Framework/SoftwareModeling/src/test/java/ghidra/program/model/symbol/StubSymbol.java +++ b/Ghidra/Framework/SoftwareModeling/src/test/java/ghidra/program/model/symbol/StubSymbol.java @@ -37,6 +37,7 @@ public class StubSymbol implements Symbol { public StubSymbol(String name) { this.name = name; + id = nextId++; } public StubSymbol(String name, Address address) {