summaryrefslogtreecommitdiff
path: root/Tools/Source/GenBuild/org/tianocore/build/global/GlobalData.java
diff options
context:
space:
mode:
Diffstat (limited to 'Tools/Source/GenBuild/org/tianocore/build/global/GlobalData.java')
-rw-r--r--Tools/Source/GenBuild/org/tianocore/build/global/GlobalData.java11
1 files changed, 8 insertions, 3 deletions
diff --git a/Tools/Source/GenBuild/org/tianocore/build/global/GlobalData.java b/Tools/Source/GenBuild/org/tianocore/build/global/GlobalData.java
index e843362c29..195f2e93aa 100644
--- a/Tools/Source/GenBuild/org/tianocore/build/global/GlobalData.java
+++ b/Tools/Source/GenBuild/org/tianocore/build/global/GlobalData.java
@@ -768,13 +768,18 @@ public class GlobalData {
String guid = null;
Set set = spdTable.keySet();
Iterator iter = set.iterator();
-
+
+ if (iter == null) {
+ return null;
+ }
+
while (iter.hasNext()){
Spd spd = (Spd) spdTable.get(iter.next());
guid = spd.getGuidFromCname(cName);
if (guid != null){
- cNameGuid[0] = new String(cName);
- cNameGuid[1] = new String(guid);
+ cNameGuid = new String[2];
+ cNameGuid[0] = cName;
+ cNameGuid[1] = guid;
break;
}
}