From b433ee9e4e50cd430f72f9ad8ec716ca5ac691a9 Mon Sep 17 00:00:00 2001 From: John Date: Thu, 25 Mar 2010 14:42:43 +0000 Subject: [PATCH] --- PROMS/DataLoader/RoFst.cs | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/PROMS/DataLoader/RoFst.cs b/PROMS/DataLoader/RoFst.cs index 4a0d67a1..fb5edab2 100644 --- a/PROMS/DataLoader/RoFst.cs +++ b/PROMS/DataLoader/RoFst.cs @@ -29,10 +29,10 @@ namespace DataLoader XmlElement xml = d.DocumentElement; XmlNode rodef = xml.SelectSingleNode("//zRODefaults"); XmlElement ele = rodef as XmlElement; - string tmp = null; + //string tmp = null; if (ele != null) { - roDbpath = ele.GetAttribute("zROPATH"); + //roDbpath = ele.GetAttribute("zROPATH"); sp_prefix = ele.GetAttribute("zSetpoint"); img_prefix = ele.GetAttribute("zGraphics"); } @@ -85,11 +85,14 @@ namespace DataLoader rofst.Dispose(); // Now load any images in... type 8: // Intergrated Graphics RO type - for (int i = 0; i < rofstinfo.ROFSTLookup.myHdr.myDbs.Length; i++) + if (rofstinfo.ROFSTLookup != null) { - // walk through the rofst 'database' searching for - // all nodes that are integrated graphics, i.e. type 8. - if (rofstinfo.ROFSTLookup.myHdr.myDbs[i].children != null) MigrateRoFstGraphics(roDbpath, rofstinfo.ROFSTLookup.myHdr.myDbs[i].children, rodb); + for (int i = 0; i < rofstinfo.ROFSTLookup.myHdr.myDbs.Length; i++) + { + // walk through the rofst 'database' searching for + // all nodes that are integrated graphics, i.e. type 8. + if (rofstinfo.ROFSTLookup.myHdr.myDbs[i].children != null) MigrateRoFstGraphics(roDbpath, rofstinfo.ROFSTLookup.myHdr.myDbs[i].children, rodb); + } } }